math.Abs
Returns the absolute value of the given number.
- Syntax
- math.Abs VALUE
- Returns
- float64
Usage
The math.Abs function returns the absolute value of the given number.
Examples
{{ math.Abs -2.1 }} → 2.1
{{ math.Abs 2.1 }} → 2.1Last updated:
October 21, 2026
:
content: Apply style guide to math functions (658ef2b60)
Improve this page