Parameters & Returns
Parameters
Returns
Quick Summary
Truncates a number towards zero, removing the fractional part.
Takes value (number).
Returns the truncated value.
Technical Exegesis...
Returns the integer part of a number by removing the fractional component, always rounding towards zero.
Examples: mathTrunc(3.7) returns 3.0, mathTrunc(-2.7) returns -2.0
Unlike mathFloor which rounds towards negative infinity, mathTrunc always rounds towards zero.