On 17/10/2021 23:46, Cousin Ricky wrote:
> Of course, the inverse tangent of A/0 is undefined, because A/0 is
> undefined. But a simple limits exercise, as well as the very definition
> of the tangent of an angle, show that these undefined tangents
> correspond to the angles pi/2 and -pi/2, and it is therefore useful to
> pretend that they are valid.
> The purpose of atan2() is to handle these special cases, by converting a
> naive atan()'s argument into an ordered pair, thus allowing the would-be
> inverse tangent of A/0 to be computed without having to divide by 0. A
> simple scene file shows that the *only* time atan2() fails with a domain
> error is when *both* A and B are zero. Of course, (0, 0) is an
> indeterminate case, for which returning a value would be nonsensical.
Cousin Ricky is right about everything!
And therefore, my problem is when A AND B are equal to zero.
Lot of datas to deal with, the debugging will be long...
(i'm working on the visualization of complex functions with domain coloring)
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message