From 6f1201c1198d1ebb2b2980e134db84ac1cf4cd3d Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 28 Sep 2007 19:28:47 +0000 Subject: [PATCH] Replace angle::epsilon with a #defined value instead. I don't know how to define a static member variable in a template header file. git-svn-id: http://svn.voria.com/code@799 1f10aa63-cdf2-0310-b900-c93c546f37ac --- ETL/trunk/ETL/_angle.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ETL/trunk/ETL/_angle.h b/ETL/trunk/ETL/_angle.h index f1a9206..fcfa9a3 100644 --- a/ETL/trunk/ETL/_angle.h +++ b/ETL/trunk/ETL/_angle.h @@ -40,6 +40,8 @@ # define HALF_PI (PI/2) #endif +#define ANGLE_EPSILON (1.0e-6) + /* === T Y P E D E F S ===================================================== */ /* === C L A S S E S & S T R U C T S ======================================= */ @@ -164,14 +166,14 @@ public: on the unit circle. */ bool operator==(const angle &rhs)const - { return std::abs(dist(rhs).v)epsilon; } + { return std::abs(dist(rhs).v)>ANGLE_EPSILON; } //! Absolute Angle Function /*! This function will return the @@ -236,15 +238,13 @@ public: return ret; } - bool operator!()const { return std::abs(mod().v) < epsilon; } + bool operator!()const { return std::abs(mod().v) < ANGLE_EPSILON; } private: static value_type rot_floor(value_type x) { return static_cast(std::floor(x/(PI*2))*PI*2); } - static const value_type epsilon = 1.0e-6; - public: /* ** Conversion Classes -- 2.7.4