From a4d794bac70c140a0e0b92dbfb4d29924eaa92a1 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 20 Feb 2014 23:06:14 -0700 Subject: [PATCH] Changed IsZero to use epsilon, removed use epsilon comment, and removed virtual destructor, which I don't know why I added that. --- include/math/Vector3.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/math/Vector3.h b/include/math/Vector3.h index fee6a6d..4e54233 100644 --- a/include/math/Vector3.h +++ b/include/math/Vector3.h @@ -24,9 +24,6 @@ TVector3( void ); TVector3( BaseType X, BaseType Y, BaseType Z ); - virtual ~TVector3( void ) { } - - // TODO: Implement and use epsilon comparison bool operator==( const TVector3& ) const; bool operator!=( const TVector3& ) const; @@ -182,8 +179,7 @@ template< typename BaseType > inline bool TVector3< BaseType >::IsZero( void ) const { - // TODO: Use epsilon - return x == 0 && y == 0 && z == 0; + return cmpf(x, 0) == 0 && cmpf(y, 0) == 0 && cmpf(z, 0) == 0; } template< typename BaseType >