Fix Clang 11 build failure over -Wabsolute-value
parent
b56df8f6da
commit
6b31e67dd3
|
@ -561,7 +561,7 @@ real_t CameraMatrix::get_fov() const {
|
||||||
right_plane.normalize();
|
right_plane.normalize();
|
||||||
|
|
||||||
if ((matrix[8] == 0) && (matrix[9] == 0)) {
|
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 {
|
} else {
|
||||||
// our frustum is asymmetrical need to calculate the left planes angle separately..
|
// our frustum is asymmetrical need to calculate the left planes angle separately..
|
||||||
Plane left_plane = Plane(matrix[3] + matrix[0],
|
Plane left_plane = Plane(matrix[3] + matrix[0],
|
||||||
|
@ -570,7 +570,7 @@ real_t CameraMatrix::get_fov() const {
|
||||||
matrix[15] + matrix[12]);
|
matrix[15] + matrix[12]);
|
||||||
left_plane.normalize();
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue