and looks like vvvv version of atan works properly in my case
the VL one is just the native Math.Atan() of .NET, and i would say that one is correct. the vvvv one was programmed by me when I was still in uni and it is intended for complex numbers… who knows what I was thinking back then.
some further info on Atan. the input argument of Atan is a slope of a line or a vector to a specific point on the plane. so the input can be -Infinity to +Infinity and it can only output values from -Pi/2 to +Pi/2 or -90° to +90°.
also, Atan has an ambiguity between 1. and 3. quadrant and 2. and 4. quadrant.
so Atan cannot tell you from which of the ambiguous quadrant the slope of a vector to a point was (pointing up or down).
for that reason, it is recommended to use Atan2 to remove the ambiguity, but you need x and y of a coordinate point for it, not the slope:
but in VL it is even easier, you can use the Angle 2D/3D nodes.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.