From f92c378423f81b4058c19f8fc3d7e631ceb8304d Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 15 Dec 2024 14:17:27 +0000 Subject: vector difference works with floating point Makes it a generic wrapper --- lib/maths.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/maths.h b/lib/maths.h index 3959896..b28fe01 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -79,8 +79,11 @@ operator-(const GlobalPosition & global, const CalcPosition & relative) return global - GlobalPosition(relative); } -template -constexpr RelativePosition +template +using DifferenceVector = glm::vec, T, float>, Q>; + +template +constexpr DifferenceVector difference(const glm::vec & globalA, const glm::vec & globalB) { return globalA - globalB; -- cgit v1.2.3