T2dAngleBetween bug?
by Teck Lee Tan · in Torque Game Builder · 09/10/2006 (11:45 am) · 0 replies
I'm not sure if this qualifies as a bug, per se, but I know the behaviour is slightly different from the old angleBetween2d function from the Alpha.
Basically, everything works as expected, except for the case where one of the vectors fed to the function is "0 0", in which case the angle returned is always "90". I've been getting around this by feeding "0.0001 0" in place of "0 0", in order to get the angle off the x-axis, but it feels like I shouldn't need to do this. Is there some way to get the function to treat "0 0" as a zero-angle? I know angleBetween2d did this, but I no longer have the Alpha handy to check the source to see what's different.
Basically, everything works as expected, except for the case where one of the vectors fed to the function is "0 0", in which case the angle returned is always "90". I've been getting around this by feeding "0.0001 0" in place of "0 0", in order to get the angle off the x-axis, but it feels like I shouldn't need to do this. Is there some way to get the function to treat "0 0" as a zero-angle? I know angleBetween2d did this, but I no longer have the Alpha handy to check the source to see what's different.