|
![](/i/fill.gif) |
>>"atan2(A,B): Arc-tangent of (A/B). Returns the angle, measured in
>>radians, whose tangent is (A/B). Returns appropriate value even if B is
>>zero. Use atan2(A,1) to compute usual atan(A) function."
>
>
>>Um... yeah, OK... so why does atan2(0, 0) give we a fatal parse error?
>
>
> Because the result is not defined. You are basically asking the
> direction of a zero vector, which has none.
I just thought the whole point of using atan2 was to _avoid_ divide by
zero errors.
Sure, if the vector has a length of zero it has no defined direction.
OTOH, I would imagine in most cases it just wouldn't *matter* what
number the function returns in this case - just so long as it returns
something, rather than an error...
Oh well.
Post a reply to this message
|
![](/i/fill.gif) |