Function normalize

  • Normalizes a number within a specified range.

    Parameters

    • n: number

      The number to normalize.

    • min: number

      The minimum value of the range.

    • max: number

      The maximum value of the range.

    Returns number

    The normalized number within the specified range.