• Bilinear interpolation between a1, b1, a2 and b2 based on s and t, where s and t are numbers between 0.0 and 1.0.

    The calculation is as follows: a1 and b1 are interpolated based on s to give p, a2 and b2 are interpolated based on s to give q, and then the final result is obtained by interpolating p and q based on t.

    The result will be equal to a1 when both s and t is 0.0, equal to a2 when s is 0.0 and t is 1.0, equal to b1 when s is 1.0 and t is 0.0, and equal to b2 when both s and t is 1.0

    Parameters

    • a1: number

      the first start value - a floating point number

    • b1: number

      the first end value - a floating point number

    • a2: number

      the second start value - a floating point number

    • b2: number

      the second end value - a floating point number

    • s: number

      a floating point number in the interval [0.0, 1.0]

    • t: number

      a floating point number in the interval [0.0, 1.0]

    Returns number

    a value between a1, b1, a2 and b2

Generated using TypeDoc