func Mathf_LerpAngle(a, b, t float64) (r float64) { if r = Mathf_Repeat(b-a, 360); r > 180 { r -= 360 } r = unum.Clamp01(t)*r + a return }
func Mathf_Lerp(from, to, t float64) float64 { return unum.Clamp01(t)*(to-from) + from }
func Mathf_SmoothStep(from, to, t float64) float64 { t = unum.Clamp01(t) t = -2*t*t*t + 3*t*t return to*t + from*(1-t) }