Calculates a linear interpolation within the inclusive range specified by start and end based on ratio.
start
end
ratio
The ratio between start and end.
The start of the range.
The end of the range.
Returns the interpolated number.
interpolate(0.5, 0, 10)// => 5interpolate(1.5, 0, 10)// => 15interpolate(-0.5, 0, 10)// => -5 Copy
interpolate(0.5, 0, 10)// => 5interpolate(1.5, 0, 10)// => 15interpolate(-0.5, 0, 10)// => -5
Calculates a linear interpolation within the inclusive range specified by
start
andend
based onratio
.