atan2 (Function)

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

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 (float): The point's y coordinate
  • x (float): The point's x coordinate

Returns: float

Example

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