ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
28:e09b7ac11dea
Parent:
26:baa7077449e7
Child:
29:d59fbe128d1f
--- a/Math/Math.cpp	Fri Apr 05 17:16:59 2019 +0000
+++ b/Math/Math.cpp	Fri Apr 12 20:53:00 2019 +0000
@@ -3,4 +3,8 @@
 int Math::lerp(int a, int b) {
     const double t = 0.6;
     return (b * t) + (a * (1 - t)) + 0.5;
+}
+
+int Math::lerp(int a, int b, double t) {
+    return (b * t) + (a * (1 - t)) + 0.5;
 }
\ No newline at end of file