lerp

fun lerp(x: Double, fromLo: Double, fromHi: Double, toLo: Double, toHi: Double): Double

Linearly interpolates between \(fromLo, fromHi\) and \(toLo, toHi\) at value x.


fun lerp(low: Double, high: Double, t: Double): Double

Linearly interpolates between \(low\) and \(high\) at value t.

Parameters

t

interpolation factor, typically in the range \(0, 1\)