From 5c613a10364f30bd6add25f7950433f0c482c3ca Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 31 Oct 2021 13:54:11 -0400 Subject: (mkosarek) Working undamped spring motion --- shared_cpp/mathlib.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shared_cpp/mathlib.h') diff --git a/shared_cpp/mathlib.h b/shared_cpp/mathlib.h index 5f9abff..0a39195 100644 --- a/shared_cpp/mathlib.h +++ b/shared_cpp/mathlib.h @@ -36,6 +36,8 @@ struct Vector2 { float x = 0; float y = 0; + Vector2(); + Vector2(float inX, float inY); Vector2 operator+(Vector2 other); Vector2& operator+=(Vector2 other); Vector2 operator-(Vector2 other); @@ -113,6 +115,8 @@ struct Vector4 { void printDebug(const char* name); }; +Vector4 lerp(Vector4 start, Vector4 end, float t); + struct Mat4x4 { float m[16] = { 1, 0, 0, 0, -- cgit v1.2.1