hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/core/camera.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-18 05:02:13 +0200
committerhachem <im@hachem.wtf>2025-08-18 05:02:13 +0200
commit0c77bdb5a48343005dfdf1509d004b36022efb32 (patch)
tree6bc9df4e16037eb557e5a3ce6d0dce4b3323cd48 /src/core/camera.h
parentd65233be9433a01c54e959aea72e87ff2e385937 (diff)
fix: improvements, bump to C++20 and fix bugs
Diffstat (limited to 'src/core/camera.h')
-rw-r--r--src/core/camera.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/camera.h b/src/core/camera.h
index 809be48..677cb71 100644
--- a/src/core/camera.h
+++ b/src/core/camera.h
@@ -3,10 +3,7 @@
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
-#define _USE_MATH_DEFINES
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
+#include <numbers>
namespace Donut
{
@@ -121,7 +118,7 @@ namespace Donut
double m_orbital_min_radius = 1e10;
double m_orbital_max_radius = 1e12;
float m_azimuth = 0.0f;
- float m_elevation = static_cast<float>(M_PI) / 2.0f;
+ float m_elevation = static_cast<float>(std::numbers::pi) / 2.0f;
float m_orbital_speed = 0.01f;
double m_zoom_speed = 25e9f;
bool m_dragging = false;