aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Math/Math.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-29 12:16:17 +0800
committerchai <chaifix@163.com>2018-07-29 12:16:17 +0800
commit5560448bb78ed865aeb77f62cf85a2aed302779d (patch)
tree0381def6419d98b9cbf950db21cbe38d555c5688 /src/libjin/Math/Math.h
parente9dcb75fb3cdbabd7152b0303af4dc27b4bcca3d (diff)
*update
Diffstat (limited to 'src/libjin/Math/Math.h')
-rw-r--r--src/libjin/Math/Math.h6
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);
+ }
+
}
}