diff options
author | chai <chaifix@163.com> | 2018-07-29 12:16:17 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-07-29 12:16:17 +0800 |
commit | 5560448bb78ed865aeb77f62cf85a2aed302779d (patch) | |
tree | 0381def6419d98b9cbf950db21cbe38d555c5688 /src/libjin/Math/Math.h | |
parent | e9dcb75fb3cdbabd7152b0303af4dc27b4bcca3d (diff) |
*update
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); + } + } } |