• Performs inverse linear interpolation.

    This function returns the normalized value of a in the range [x, y]. It calculates how far a is between x and y and returns a value between 0 and 1.

    Parameters

    • x: number

      The start of the range.

    • y: number

      The end of the range.

    • a: number

      The value to normalize, which should lie between x and y.

    Returns number

    A normalized value between 0 and 1 that represents where a lies between x and y.