Lerp or Linear interpolation This function will return new value in 't' percentage between 'v0' and 'v1'
(v0, v1, t float64)
| 3 | // Lerp or Linear interpolation |
| 4 | // This function will return new value in 't' percentage between 'v0' and 'v1' |
| 5 | func Lerp(v0, v1, t float64) float64 { |
| 6 | // see: https://en.wikipedia.org/wiki/Linear_interpolation |
| 7 | return (1-t)*v0 + t*v1 |
| 8 | } |
nothing calls this directly
no outgoing calls
no test coverage detected