augment-vir - v31.13.0
    Preparing search index...

    Function clamp

    • Clamp's the given value to within the min and max bounds, inclusive.

      Parameters

      • value: number
      • __namedParameters: Readonly<MinMax>

      Returns number

      import {clamp} from '@augment-vir/common';

      // `result` will be `40`
      const result = clamp(42, {min: 30, max: 40});