From 2c57c3f6c07537a3d5f066dc970f5472f68c586b Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Wed, 18 Dec 2024 16:58:57 +0100 Subject: [PATCH] Fixed direction for spherical --- Spherical.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spherical.cpp b/Spherical.cpp index 55836a9..671b04c 100644 --- a/Spherical.cpp +++ b/Spherical.cpp @@ -14,11 +14,11 @@ template SphericalOf::SphericalOf(float distance, AngleOf horizontal, AngleOf vertical) { if (distance < 0) { - this->distance = distance; - this->direction = DirectionOf(horizontal, vertical); - } else { this->distance = -distance; this->direction = -DirectionOf(horizontal, vertical); + } else { + this->distance = distance; + this->direction = DirectionOf(horizontal, vertical); } }