interpolate

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

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

Parameters

from

the ray from which the interpolation starts.

to

the ray at which the interpolation ends.

by

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