math.Atan2
Returns the arctangent, in radians, of the given number pair, determining the correct quadrant from their signs.
- Syntax
- math.Atan2 VALUE VALUE
- Returns
- float64
Usage
The math.Atan2 function returns the arctangent, in radians, of the first number divided by the second number. The function uses the signs of both numbers to determine the quadrant of the returned value.
Examples
{{ math.Atan2 1 2 }} → 0.4636476090008061With negative numbers:
{{ math.Atan2 -1 -2 }} → -2.677945044588987Last updated:
October 21, 2026
:
content: Apply style guide to math functions (658ef2b60)
Improve this page