interpolate

fun interpolate(from: Rectangle, to: Rectangle, by: Float)

Sets this rectangle with the result of interpolation from one rectangle to another rectangle by a factor.

Parameters

from

the rectangle from which the interpolation starts.

to

the rectangle at which the interpolation ends.

by

the interpolation factor which is expected to be in the range of [0, 1].