lerp

fun lerp(startValue: Number, endValue: Number, t: Number): Double

Perform linear interpolation between two values.

Return

The interpolated value.

Parameters

startValue

The value to start at.

endValue

The value to end at.

t

How far between the two values to interpolate. This is clamped to 0, 1.


Perform linear interpolation between two values.

Return

The interpolated value.

Parameters

t

How far between the two values to interpolate. This is clamped to 0, 1.


Perform linear interpolation like lerp, but interpolates correctly when they wrap around 1 revolution (360 degrees).

Return

The interpolated value.

Parameters

a

The start angle.

b

The end angle.

t

The interpolation parameter.


Perform linear interpolation like lerp, but interpolates correctly when they wrap around 1 revolution (360 degrees).

Return

The interpolated value.

Parameters

t

The interpolation parameter.