From: dooglus Date: Fri, 28 Sep 2007 02:07:59 +0000 (+0000) Subject: Operator '!' is supposed to be true when an angle is 'no rotation'. It was failing... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=716873ad2fd2cb3c07e311ee7b0e2f023500c868;p=synfig.git 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 --- 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: