From 5fc43dc15ac6c678c1bf5e6b262adaee2edbdf33 Mon Sep 17 00:00:00 2001 From: HENRY Benjamin Date: Mon, 7 Jun 2021 16:50:50 +0200 Subject: [PATCH] add pi_number define (fix windows) --- sources/Models/Vector2.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/Models/Vector2.hpp b/sources/Models/Vector2.hpp index b8f5b9cc..b3dacf2b 100644 --- a/sources/Models/Vector2.hpp +++ b/sources/Models/Vector2.hpp @@ -9,6 +9,8 @@ #include #include "Vector/Vector2.hpp" +#define PI_NUMBER 3.14159265359 + namespace BBM { //! @brief A Vector2 data type. (templated to allow any kind of vector2) @@ -124,7 +126,7 @@ namespace BBM { float dot = this->x * o.x + this->y * o.y; float det = this->x * o.y - this->y * o.x; - return (std::atan2(det, dot) * (180.0f / M_PI)); + return (std::atan2(det, dot) * (180.0f / PI_NUMBER)); } double magnitude() const