trunc
Truncate toward zero.
Syntax
Section titled “Syntax”v = trunc(number)Description
Section titled “Description”Returns the integer part of number by removing the fractional component. Differs from int for negatives: trunc(-2.5) = -2 (toward zero), int(-2.5) = -3 (toward minus infinity).
Examples
Section titled “Examples”trunc(8.7) % 8trunc(-8.7) % -8