   0 error :\
  hehe its me again After advice from within this forum, i have changed my code abit (thanks guys!). Problem is however that if any vector that enters this function has a zero value, the function fails.My proposed solution would be to check for 0 values and replace them with a value close to 0, ie/ 0.000000001, although this does work, i really doubt thats the way to go. Is there another solution to this problem?? // The function in question.....float angleBetweenVectors(vertex v1,vertex v2){v1.Normalize();v2.Normalize();float dot = v1&v2float angle = (float)acos(dot); // if (_isnan(angle))return(0);return(angle);cheers, apologies for my lack of math skillzPaul} 
  Check if the vectors are zero (or close to zero). If one is, skip the dot product : the result is zero anyway. ;  Well, if you set your vectors to .00000001, then you are potentially making them very different things. A vector with values of 0 doesn''t really point in any direction, but a vector with values .000000001 points in a very specific direction. So, when you''re doing a function that finds the angle between two vectors, there is a pretty significant difference between 0 and .000000001 .I think, what you should do is figure out why you are ending up with vectors of value 0, and stop that from happening. I don''t know what context you are using these vectors, but I''m pretty sure it doesn''t make sense to have vectors of 0s. 