From 5560448bb78ed865aeb77f62cf85a2aed302779d Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 29 Jul 2018 12:16:17 +0800 Subject: *update --- src/libjin/Math/Math.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libjin/Math/Math.h') 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 + inline T lerp(T a, T b, float t) + { + return a + t * (b - a); + } + } } -- cgit v1.1-26-g67d0