From 49cfebf74e97ccc88d2d6a459172cb2a17e545b8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 21 Mar 2024 20:05:56 +0000 Subject: vector_yaw only needs 2 dimensions --- lib/maths.cpp | 2 +- lib/maths.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/maths.cpp b/lib/maths.cpp index 68662fc..bf17204 100644 --- a/lib/maths.cpp +++ b/lib/maths.cpp @@ -76,7 +76,7 @@ rotate_yp(Rotation2D a) } float -vector_yaw(const Direction3D & diff) +vector_yaw(const Direction2D & diff) { return std::atan2(diff.x, diff.y); } diff --git a/lib/maths.h b/lib/maths.h index adf2158..ce18b3f 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -84,7 +84,7 @@ glm::mat4 rotate_pitch(float); glm::mat4 rotate_yp(Rotation2D); glm::mat4 rotate_ypr(Rotation3D); -float vector_yaw(const Direction3D & diff); +float vector_yaw(const Direction2D & diff); float vector_pitch(const Direction3D & diff); float round_frac(const float & v, const float & frac); -- cgit v1.2.3