Numeric
The Numeric registry includes a range of utilities for performing numerical operations and calculations, making it easier to handle numbers and perform math functions in your templates.
Last updated
The Numeric registry includes a range of utilities for performing numerical operations and calculations, making it easier to handle numbers and perform math functions in your templates.
Last updated
You can easily import all the functions from the numeric
registry by including the following import statement in your code
The function returns the largest integer that is less than or equal to the provided number.
The function returns the smallest integer that is greater than or equal to the provided number.
The function rounds a number to a specified precision, allowing control over the number of decimal places. It also considers an optional rounding threshold to determine whether to round up or down (default to 0.5).
The function performs addition on a slice of values, summing all elements in the slice and returning the total.
The function performs a unary addition, incrementing the provided value by one.
The function performs subtraction on a slice of values, starting with the first value and subtracting each subsequent value from it.
The function multiplies a sequence of values together and returns the result as an int64
.
The function multiplies a sequence of values and returns the result as a float64
.
The function divides a sequence of values and returns the result as an int64
.
The function divides a sequence of values, starting with the first value, and returns the result as a float64
.
The function returns the remainder of the division of x
by y
.
The function returns the minimum value among the provided arguments.
The function returns the minimum value among the provided floating-point arguments.
The function returns the maximum value among the provided arguments.
The function returns the maximum value among the provided floating-point arguments.
tt
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version
Signature
Must version