diff options
Diffstat (limited to 'src/libjin/math/math.h')
-rw-r--r-- | src/libjin/math/math.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libjin/math/math.h b/src/libjin/math/math.h index 5b34f4c..d4bd202 100644 --- a/src/libjin/math/math.h +++ b/src/libjin/math/math.h @@ -65,6 +65,12 @@ namespace math return a > upper ? upper : a; } + template<typename T> + inline T lerp(T a, T b, float t) + { + return a + t * (b - a); + } + } } |