• Linear mapping of x from range [a1, a2] to range [b1, b2].

    Parameters

    • x: number

      Value to be mapped.

    • a1: number

      Minimum value for range A.

    • a2: number

      Maximum value for range A.

    • b1: number

      Minimum value for range B.

    • b2: number

      Maximum value for range B.

    Returns number