From 06268c38d9c5e6b47af6d940d8753162e97f9185 Mon Sep 17 00:00:00 2001 From: wfpokorny Date: Fri, 11 Mar 2016 20:28:16 -0500 Subject: [PATCH] Update vector.h Use of abs() instead of fabs() in vector functions recently created for the new user defined camera caused problems for Ubuntu users. Edit changes to fabs(). See: http://news.povray.org/povray.text.scene-files/message/%3C56e36723%241%40news.povray.org%3E/#%3C56e36723%241%40news.povray.org%3E --- source/core/math/vector.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/core/math/vector.h b/source/core/math/vector.h index 8db1079c0..b1aec4068 100644 --- a/source/core/math/vector.h +++ b/source/core/math/vector.h @@ -314,8 +314,8 @@ class GenericVector2d } inline bool IsNearNull(T epsilon) const { - return (abs(vect[X]) < epsilon) && - (abs(vect[Y]) < epsilon); + return (fabs(vect[X]) < epsilon) && + (fabs(vect[Y]) < epsilon); } inline GenericVector2d normalized() const { @@ -540,9 +540,9 @@ class GenericVector3d } inline bool IsNearNull(T epsilon) const { - return (abs(vect[X]) < epsilon) && - (abs(vect[Y]) < epsilon) && - (abs(vect[Z]) < epsilon); + return (fabs(vect[X]) < epsilon) && + (fabs(vect[Y]) < epsilon) && + (fabs(vect[Z]) < epsilon); } inline GenericVector3d normalized() const {