Function constrain

  • Constrain a number within a minimum and a maximum value.

    Parameters

    • x: number

      a number

    • min: number

      minimum value

    • max: number

      maximum value

    Returns number

    x<min: min, x>max: max, x

Generated using TypeDoc