Skip to content

Commit 0a062cc

Browse files
committed
Merge pull request #56 from wfpokorny/master
Update vector.h
2 parents 1eca8d0 + 06268c3 commit 0a062cc

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)