interpolate

fun ClosedRange<Float>.interpolate(progress: Float, interpolation: Interpolation): Float

Interpolate between the start and end of this range.

Return

The interpolated value.

Parameters

progress

The position to interpolate, where 0 corresponds with ClosedRange.start and 1 corresponds with ClosedRange.endInclusive.

interpolation

The function to interpolate with.