lerp

inline fun lerp(a: ColorRGBA32, b: ColorRGBA32, t: Float): ColorRGBA32

Returns a linearly interpolated color between a and b colors.

Parameters

a

the source color.

b

the destination color.

t

the interpolator value with an expected range of [0, 1].


inline fun lerp(a: Double, b: Double, t: Double): Double
inline fun lerp(a: Float, b: Float, t: Float): Float
inline fun Float.Companion.lerp(a: Float, b: Float, t: Float): Float

Returns a linearly interpolated value between a and b.

Parameters

a

the source value.

b

the destination value.

t

the interpolator value with an expected range of [0, 1].


inline fun lerp(a: Vector2F, b: Vector2F, t: Float): Vector2F

Returns a linearly interpolated vector between a and b vectors.

Parameters

a

the source vector.

b

the destination vector.

t

the interpolator value with an expected range of [0, 1].


inline fun lerp(a: Vector2F, b: Vector2F, t: Vector2F): Vector2F

Returns a component-wise linearly interpolated vector between a and b vectors.

Parameters

a

the source vector.

b

the destination vector.

t

the interpolator vector with expected ranges of ([0, 1], [0, 1]).