math.Div
Returns the result of dividing the first number by one or more numbers.
- Syntax
- math.Div VALUE VALUE...
- Returns
- any
- Alias
- div
Usage
The math.Div function returns the result of dividing the first number by one or more numbers. If one of the numbers is a float, the result is a float. Otherwise, the function performs integer division and removes the fractional part of the result.
Examples
{{ math.Div 12 3 2 }} → 2Comparing integer and floating-point division:
{{ math.Div 5 2 }} → 2
{{ math.Div 5 2.0 }} → 2.5Last updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page