Skip to content
Snippets Groups Projects
Verified Commit 28ccc7b8 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#42] Fixed M_PI to work cross compatible

parent 1a4fcc5c
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
Pipeline #25725 failed
#include "vkcv/camera/Camera.hpp" #include "vkcv/camera/Camera.hpp"
#include <iostream> #include <cmath>
namespace vkcv::camera { namespace vkcv::camera {
...@@ -60,7 +60,7 @@ namespace vkcv::camera { ...@@ -60,7 +60,7 @@ namespace vkcv::camera {
float halfFovy = std::atan(tanHalfFovy); float halfFovy = std::atan(tanHalfFovy);
if (halfFovy < 0) { if (halfFovy < 0) {
halfFovy += M_PIf32; halfFovy += static_cast<float>(M_PI);
} }
return halfFovy * 2.0f; return halfFovy * 2.0f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment