@sstorsveen/maths - v2.0.1
    Preparing search index...

    Function clamp

    • Clamps the value x so that it is not less than min and not greater than max

      Parameters

      • x: number

        the value to clamp

      • min: number

        the minimum value allowed

      • max: number

        the maximum value allowed

      Returns number

      x clamped to [min, max]