From 716873ad2fd2cb3c07e311ee7b0e2f023500c868 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 28 Sep 2007 02:07:59 +0000 Subject: [PATCH] Operator '!' is supposed to be true when an angle is 'no rotation'. It was failing for 360 degrees, and also failing due to floating point rounding error. Fixed both of these problems. git-svn-id: http://svn.voria.com/code@789 1f10aa63-cdf2-0310-b900-c93c546f37ac --- ETL/trunk/ETL/_angle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ETL/trunk/ETL/_angle.h b/ETL/trunk/ETL/_angle.h index 67989ca..bd3231a 100644 --- a/ETL/trunk/ETL/_angle.h +++ b/ETL/trunk/ETL/_angle.h @@ -225,7 +225,7 @@ public: return ret; } - bool operator!()const { return v==0; } + bool operator!()const { return std::abs(mod().v) < epsilon; } private: -- 2.7.4