Houdini 20.5 Nodes APEX nodes

Atan2

Computes the inverse tangent of y/x.

On this page
Since 20.0

Returns the inverse tangent of y/x, using the signs of x and y to determine the quadrant of the result. The value of result is in the range -π to π.

Given a point (x, y), the result is the angle, in radians, between the positive x-axis and the ray connecting the origin to the point (x, y). Positive angles are returned for points in quadrants I and II, and negative angles are returned for points in quadrants III and IV.

Inputs

x: Float

The x-coordinate of the point.

y: Float

The y-coordinate of the point.

Outputs

result: Float

The angle, in radians, representing the inverse tangent of y/x. The angle is in the range -π to π.

See also

APEX nodes