Function floor

  • Calculates the floor of a number

    Parameters

    • num: number

      The number to calculate the floor for.

    Returns number

    The largest integer less than or equal to the given number.

    Example

    floor(-4.6);                // Returns -4
    floor(10.5); // Returns 10

Generated using TypeDoc