summaryrefslogtreecommitdiffstats
path: root/src/core/CameraMatrix.cpp
diff options
context:
space:
mode:
authorMarc <marc.gilleron@gmail.com>2021-02-03 20:16:51 +0000
committerGitHub <noreply@github.com>2021-02-03 20:16:51 +0000
commit9598fd5c8ed10d10c2923e7bb117fafb37daf77e (patch)
tree498339ad007766de1db541ce4cf9bf2a3bde3e12 /src/core/CameraMatrix.cpp
parent6d3b8f44f415657b33476488ba0b2042d30de3c0 (diff)
parent09df1fc9b58f886d3ed0d781d3d0f069c2b6b1a8 (diff)
downloadredot-cpp-9598fd5c8ed10d10c2923e7bb117fafb37daf77e.tar.gz
Merge pull request #504 from HrishikeshP-01/better-use-of-Math
Replaced static math functions in CameraMatrix by Math usage
Diffstat (limited to 'src/core/CameraMatrix.cpp')
-rw-r--r--src/core/CameraMatrix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/CameraMatrix.cpp b/src/core/CameraMatrix.cpp
index 9d35d5c..b1b7f20 100644
--- a/src/core/CameraMatrix.cpp
+++ b/src/core/CameraMatrix.cpp
@@ -585,7 +585,7 @@ real_t CameraMatrix::get_fov() const {
right_plane.normalize();
if ((matrix[8] == 0) && (matrix[9] == 0)) {
- return rad2deg(acos(abs(right_plane.normal.x))) * 2.0;
+ return Math::rad2deg(acos(abs(right_plane.normal.x))) * 2.0;
} else {
// our frustum is asymmetrical need to calculate the left planes angle separately..
Plane left_plane = Plane(matrix[3] + matrix[0],
@@ -594,7 +594,7 @@ real_t CameraMatrix::get_fov() const {
matrix[15] + matrix[12]);
left_plane.normalize();
- return rad2deg(acos(abs(left_plane.normal.x))) + rad2deg(acos(abs(right_plane.normal.x)));
+ return Math::rad2deg(acos(abs(left_plane.normal.x))) + Math::rad2deg(acos(abs(right_plane.normal.x)));
}
}