From 7481957415ecc581b7dfd2453b0e61058e2ac0c6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 14 Feb 2021 13:42:10 +0000 Subject: Add vector pitch --- utility/maths.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'utility/maths.cpp') diff --git a/utility/maths.cpp b/utility/maths.cpp index aa44220..fb14a17 100644 --- a/utility/maths.cpp +++ b/utility/maths.cpp @@ -21,6 +21,12 @@ vector_yaw(const glm::vec3 & diff) return std::atan2(diff.x, diff.z); } +float +vector_pitch(const glm::vec3 & diff) +{ + return std::atan(diff.y); +} + float round_frac(const float & v, const float & frac) { -- cgit v1.2.3