Function constrain

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

    Returns

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

    Parameters

    • x: number

      a number

    • min: number

      minimum value

    • max: number

      maximum value

    Returns number

Generated using TypeDoc