Skip to content

Commit 06268c3

Browse files
committed
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
1 parent 1eca8d0 commit 06268c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/core/math/vector.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ class GenericVector2d
314314
}
315315
inline bool IsNearNull(T epsilon) const
316316
{
317-
return (abs(vect[X]) < epsilon) &&
318-
(abs(vect[Y]) < epsilon);
317+
return (fabs(vect[X]) < epsilon) &&
318+
(fabs(vect[Y]) < epsilon);
319319
}
320320
inline GenericVector2d normalized() const
321321
{
@@ -540,9 +540,9 @@ class GenericVector3d
540540
}
541541
inline bool IsNearNull(T epsilon) const
542542
{
543-
return (abs(vect[X]) < epsilon) &&
544-
(abs(vect[Y]) < epsilon) &&
545-
(abs(vect[Z]) < epsilon);
543+
return (fabs(vect[X]) < epsilon) &&
544+
(fabs(vect[Y]) < epsilon) &&
545+
(fabs(vect[Z]) < epsilon);
546546
}
547547
inline GenericVector3d normalized() const
548548
{

0 commit comments

Comments
 (0)