alias for Math.trunc. but I'd recommend using const my_int = my_float | 0 for truncating a float.

  • Returns the integral part of the a numeric expression, x, removing any fractional digits. If x is already an integer, the result is x.

    Parameters

    • x: number

      A numeric expression.

    Returns number