Since angles are stored in radians, we need to add on PI, not 0.5 to rotate by 180...
[synfig.git] / ETL / trunk / ETL / _angle.h
index cfa7dc2..ae3b157 100644 (file)
@@ -1,7 +1,7 @@
 /* ========================================================================
 ** Extended Template and Library
 ** Angle Abstraction Class Implementation
-** $Id: _angle.h,v 1.1.1.1 2005/01/04 01:31:46 darco Exp $
+** $Id$
 **
 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
 **
@@ -59,7 +59,7 @@ public:
 protected:
        typedef value_type unit;
 
-       unit v; //! Stored in rotations
+       unit v; //! Stored in radians
 
 public:
 
@@ -122,8 +122,8 @@ public:
        operator~()const
        {
                angle ret;
-               ret.v=(value_type)std::floor(v+0.5f);
-               return ret;
+               ret.v = v+PI;
+               return ret.mod();
        }
 
        /*! Returns true if the shortest
@@ -239,7 +239,7 @@ private:
 
 public:
        /*
-       ** Converstion Classes
+       ** Conversion Classes
        */
 
        class rad;
@@ -247,7 +247,7 @@ public:
        class rot;
 
        /*
-       ** Trigometric Classes
+       ** Trigonometric Classes
        */
 
        class sin;