Builtin Library
README.md
math.atan2 (procNode)
The angle of the point (x, y) from the x axis, in radians, element by element: arctangent of y over x, quadrant aware, from -pi to pi. y comes first, as in math.atan2(y, x).
The atan operation of the authoring surface, called through the Luau node on proc.fieldc.operators. Operands are numbers, vectors, Columns or Fields. When every operand is a plain number or vector the answer is the plain result, folded where the node cooks; otherwise the answer is a Field: a template over its operands that whatever reads it evaluates in one dispatch together with the chain around it. Nothing dispatches for this node alone. Over numbers and animated values the answer is an animated value: the operation at every time.
It is math.atan given both operands.
Inputs
y(Value, default 0). The vertical component.x(Value, default 0). The horizontal component.
Outputs
value. The angle in radians, from -pi to pi.
local value = g.math.atan2({ y = 1, x = -1 }) -- 2.356 (3 pi / 4)