|
 |
Le 2021-10-17 à 06:40, kurtz le pirate a écrit :
>
> Hello,
>
> I have a problem with atan2(a,b) when b = zero.
>
> The documentation on the page
> <http://www.povray.org/documentation/view/3.7.1/228/> says :
>
> Arc-tangent of (A/B). Returns the angle, measured in radians, whose
> tangent is (A/B). **Returns appropriate value even if B is zero**
>
> In my case, i get : Parse Error: Domain error in atan2!
>
> So it's up to me to test if b=zero and return the appropriate value ?
>
>
>
A/B is undefined when B = 0.
So, «Parse Error: Domain error in atan2» is the appropriate value when B
is zero.
The appropriate value when B is zero would be plus AND minus infinity.
Post a reply to this message
|
 |