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 1be01bb..ae3b157 100644 (file)
@@ -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;