]> Skullheadx's Git Forge - Collision-Simulation.git/commitdiff
Create linear_interpolation.py
authorSkullheadx <704277@pdsb.net>
Mon, 16 Jan 2023 23:30:48 +0000 (18:30 -0500)
committerSkullheadx <704277@pdsb.net>
Mon, 16 Jan 2023 23:30:48 +0000 (18:30 -0500)
linear_interpolation.py [new file with mode: 0644]

diff --git a/linear_interpolation.py b/linear_interpolation.py
new file mode 100644 (file)
index 0000000..82f8d43
--- /dev/null
@@ -0,0 +1,8 @@
+class LinearInterpolation:
+
+    def __init__(self, start, end):
+        self.start = start
+        self.end = end
+
+    def evaluate(self, time):
+        return time * self.start - (1 - time) * self.end