summaryrefslogtreecommitdiffstats
path: root/include/core/CameraMatrix.hpp
diff options
context:
space:
mode:
authorHrishikesh <hrishikeshpramodnair@gmail.com>2021-02-03 06:32:44 +0530
committerHrishikesh <hrishikeshpramodnair@gmail.com>2021-02-03 06:32:44 +0530
commit8558d2360a16e5ee4dcfd9813617f309a4fbb9e7 (patch)
tree3a75530d8a2f95195313fadc90275b7035712827 /include/core/CameraMatrix.hpp
parent6d3b8f44f415657b33476488ba0b2042d30de3c0 (diff)
downloadredot-cpp-8558d2360a16e5ee4dcfd9813617f309a4fbb9e7.tar.gz
Removed redundant function definitions in CameraMatrix and used the ones in Math.hpp
Diffstat (limited to 'include/core/CameraMatrix.hpp')
-rw-r--r--include/core/CameraMatrix.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/core/CameraMatrix.hpp b/include/core/CameraMatrix.hpp
index d9bff7f..a644b65 100644
--- a/include/core/CameraMatrix.hpp
+++ b/include/core/CameraMatrix.hpp
@@ -5,6 +5,7 @@
#include "Plane.hpp"
#include "Rect2.hpp"
#include "Transform.hpp"
+#include "Math.hpp"
#include <vector>
@@ -39,7 +40,7 @@ struct CameraMatrix {
static real_t get_fovy(real_t p_fovx, real_t p_aspect) {
- return rad2deg(atan(p_aspect * tan(deg2rad(p_fovx) * 0.5)) * 2.0);
+ return Math::rad2deg(atan(p_aspect * tan(Math::deg2rad(p_fovx) * 0.5)) * 2.0);
}
static inline double deg2rad(double p_y) { return p_y * Math_PI / 180.0; }