Returns the integer portion of x, dropping the fractional portion. This is also known as "chop" rounding. pure on all platforms.
assert(trunc(0.01) == 0); assert(trunc(0.49) == 0); assert(trunc(0.5) == 0); assert(trunc(1.5) == 1);
See Implementation
Returns the integer portion of x, dropping the fractional portion. This is also known as "chop" rounding. pure on all platforms.