atan

taichi_glsl.scalar.atan(y, x=1)

Return the arc-tangent of the parameters

atan(y, x) or atan(y_over_x):

atan returns the angle whose trigonometric arctangent is y / x or y_over_x, depending on which overload is invoked.

In the first overload, the signs of y and x are used to determine the quadrant that the angle lies in. The values returned by atan in this case are in the range [−pi, pi]. Results are undefined if x is zero.

For the second overload, atan returns the angle whose tangent is y_over_x. Values returned in this case are in the range [−pi/2, pi/2].

Parameters
  • y – The numerator of the fraction whose arctangent to return.

  • x – The denominator of the fraction whose arctangent to return.

Returns

The return value is arctan(x / y).