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:
October 21, 2026
:
content: Apply style guide to math functions (658ef2b60)
Improve this page