From 6b31e67dd3583936210c0be1c69f54a366275777 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 1 Sep 2021 16:07:00 +0100 Subject: [PATCH] Fix Clang 11 build failure over -Wabsolute-value --- src/core/CameraMatrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/CameraMatrix.cpp b/src/core/CameraMatrix.cpp index 9f4c72ae..fa3505e3 100644 --- a/src/core/CameraMatrix.cpp +++ b/src/core/CameraMatrix.cpp @@ -561,7 +561,7 @@ real_t CameraMatrix::get_fov() const { right_plane.normalize(); if ((matrix[8] == 0) && (matrix[9] == 0)) { - return Math::rad2deg(acos(abs(right_plane.normal.x))) * 2.0; + return Math::rad2deg(acos(std::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], @@ -570,7 +570,7 @@ real_t CameraMatrix::get_fov() const { matrix[15] + matrix[12]); left_plane.normalize(); - return Math::rad2deg(acos(abs(left_plane.normal.x))) + Math::rad2deg(acos(abs(right_plane.normal.x))); + return Math::rad2deg(acos(std::abs(left_plane.normal.x))) + Math::rad2deg(acos(std::abs(right_plane.normal.x))); } }