interpolate

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

Parameters

from

the line segment from which the interpolation starts.

to

the line segment at which the interpolation ends.

by

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