alias for Math.trunc. but I'd recommend using const my_int = my_float | 0 for truncating a float.
Math.trunc
const my_int = my_float | 0
Returns the integral part of the a numeric expression, x, removing any fractional digits. If x is already an integer, the result is x.
A numeric expression.
alias for
Math.trunc
. but I'd recommend usingconst my_int = my_float | 0
for truncating a float.