Atan
atan
returns the arc tangent of a value. The result is expressed in degrees, radians, or grades, depending on adxmda. The type of the result is Double.
atan
returns a negative value if x
is negative (you have to add 360 degrees to get a negative angle value).
atan(x)
# This function converts cartesian coordinates to polar coordinatesFunc CONVERT_TO_POLAR(X,Y,ANGLE_VALUE,DISTANCE_VALUE)Value Double X,YVariable Double ANGLE_VALUE,DISTANCE# Because we don't use the atan2 function hereIf X=0ANGLE_VALUE=sgn(Y)*acos(0)ElseANGLE_VALUE=atan(Y/X)Endif# If we don't want negative anglesANGLE_VALUE+=(ANGLE_VALUE<0)*4*acos(0)DISTANCE_VALUE=sqr(X^2+Y^2)End
sin, cos, tan, asin, acos, atan2.