atan2 (Function)

Signature: atan2(y: t0, x: t0) -> t0

Description: Returns the quadrant-aware angle of (x, y) in radians. Signed zeros select the quadrant: atan2(0.0, 0.0) is 0.0; atan2(0.0, -0.0) is pi.

Parameters

  • y (t0): The point's y coordinate
  • x (t0): The point's x coordinate

Returns: t0

Example

print(atan2(1.0, -1.0))  // 2.356194490192345
print (atan2 (1.0, -1.0))  // 2.356194490192345