math.Max
Returns the greatest of all numbers. Accepts scalars, slices, or both.
- Syntax
- math.Max VALUE...
- Returns
- float64
Usage
The math.Max function returns the greatest of all numbers. Each argument can be a number or a slice of numbers.
Examples
{{ math.Max 1 5 3 }} → 5With numbers and slices:
{{ math.Max 1 (slice 2 3) 4 }} → 4Last updated:
October 21, 2026
:
content: Apply style guide to math functions (658ef2b60)
Improve this page