the first start value - a 2-element vector object
the first end value - a 2-element vector object
the second start value - a 2-element vector object
the second end value - a 2-element vector object
a floating point number in the interval [0.0, 1.0]
a floating point number in the interval [0.0, 1.0]
a 2-element vector in which to store the result
Optional
tmp: Vec2an optional 2-element vector for temporary storage. If not provided, one will be created (and then discarded) internally
c
- the interpolation result
Generated using TypeDoc
Bilinear interpolation between
a1
,b1
,a2
andb2
based ons
andt
, wheres
andt
are numbers between0.0
and1.0
. The result is stored inc
.The calculation is as follows:
a1
andb1
are interpolated based ons
to givep
,a2
andb2
are interpolated based ons
to giveq
, and then the final result is obtained by interpolatingp
andq
based ont
.The result will be equal to
a1
when boths
andt
is0.0
, equal toa2
whens
is0.0
andt
is1.0
, equal tob1
whens
is1.0
andt
is0.0
, and equal tob2
when boths
andt
is1.0