Function clamp

  • clamp the given value

    Parameters

    • val: number

      the value to clamp

    • low: number

      lower limit

    • high: number

      higher limit

    Returns number

    clamped value