• Create a new array where:

    • The lowest value becomes 0.
    • The highest value becomes 1.
    • All other values are scaled between 0 and 1.

    Parameters

    • values: number[]

      The array of numbers.

    Returns number[]

    A new array with normalized values.