Function clamp

  • Clamps a number to bounds

    Example

    clamp(0, 64, 32);
    => 32

    Parameters

    • min: number

      The lower bound

    • value: number

      Un-clamped value

    • max: number

      The upper bound

    Returns number

Generated using TypeDoc