aboutsummaryrefslogtreecommitdiff
path: root/libjin/Math/Math.h
diff options
context:
space:
mode:
Diffstat (limited to 'libjin/Math/Math.h')
-rw-r--r--libjin/Math/Math.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libjin/Math/Math.h b/libjin/Math/Math.h
index 5b34f4c..d4bd202 100644
--- a/libjin/Math/Math.h
+++ b/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);
+ }
+
}
}