|
|
Orchid XP v2 <voi### [at] devnull> wrote:
> >>"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."
> >
> I just thought the whole point of using atan2 was to _avoid_ divide by
> zero errors.
>
> Oh well.
Yes, but not when A and B are BOTH zero. Then the function is undefined.
You could simply do some error checking before trying to calculate the
function, and skip it altogether when A = B = 0.
Mike
Post a reply to this message
|
|