• Clamp a number between a min and a max.

    Returns

    min if num < min, max if num > max, num else

    Parameters

    • num: number

      the number to clamp

    • min: number

      the minimum value

    • max: number

      the maximum value

    Returns number

Generated using TypeDoc