diff options
| author | hachem <im@hachem.wtf> | 2025-08-18 05:02:13 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-18 05:02:13 +0200 |
| commit | 0c77bdb5a48343005dfdf1509d004b36022efb32 (patch) | |
| tree | 6bc9df4e16037eb557e5a3ce6d0dce4b3323cd48 /src/core/camera.cpp | |
| parent | d65233be9433a01c54e959aea72e87ff2e385937 (diff) | |
fix: improvements, bump to C++20 and fix bugs
Diffstat (limited to 'src/core/camera.cpp')
| -rw-r--r-- | src/core/camera.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/camera.cpp b/src/core/camera.cpp index bba6ee2..9c2b061 100644 --- a/src/core/camera.cpp +++ b/src/core/camera.cpp @@ -163,7 +163,7 @@ namespace Donut glm::vec3 Camera::get_orbital_position() const { - float clamped_elevation = glm::clamp(m_elevation, 0.01f, float(M_PI) - 0.01f); + float clamped_elevation = glm::clamp(m_elevation, 0.01f, float(std::numbers::pi) - 0.01f); return glm::vec3 ( m_orbital_radius * sin(clamped_elevation) * cos(m_azimuth), @@ -191,7 +191,7 @@ namespace Donut m_azimuth += dx * m_orbital_speed; m_elevation -= dy * m_orbital_speed; - m_elevation = glm::clamp(m_elevation, 0.01f, float(M_PI) - 0.01f); + m_elevation = glm::clamp(m_elevation, 0.01f, float(std::numbers::pi) - 0.01f); } m_last_x_orbital = x; |
