From a8b6184e651c1d7b2a1a21725a7774abbc99c15b Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 17 Jan 2018 17:44:45 +1100 Subject: [PATCH] vector: use atan2 for spherical conversions --- vector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector.hpp b/vector.hpp index f273e1e7..ed732543 100644 --- a/vector.hpp +++ b/vector.hpp @@ -80,7 +80,7 @@ namespace util { return { r, std::acos (c.z / r), - std::atan (c.y / c.z) + std::atan2 (c.y, c.x) }; }