Fixed a typo - the wrong method was marked as deprecated in angle::cos.
[synfig.git] / ETL / trunk / ETL / _angle.h
index b873255..0b3461f 100644 (file)
@@ -198,6 +198,7 @@ public:
                return ret;
        }
 
+       //! Zero Rotation (0 degrees)
        static angle
        zero()
        {
@@ -206,23 +207,25 @@ public:
                return ret;
        }
 
+       //! One Complete Rotation (360 degrees)
        static angle
        one()
        {
                angle ret;
-               ret.v=PI;
+               ret.v=PI*2;
                return ret;
        }
 
+       //! One Half Rotation (180 degrees)
        static angle
        half()
        {
                angle ret;
-               ret.v=PI*0.5;
+               ret.v=PI;
                return ret;
        }
 
-       bool operator!()const { return v==0; }
+       bool operator!()const { return std::abs(mod().v) < epsilon; }
 
 private:
 
@@ -363,10 +366,10 @@ public:
        cos(const angle &a):angle(a) { }
        cos     mod()const { return angle::mod(); }
        cos dist(const angle &rhs)const { return angle::dist(rhs); }
-       operator value_type()const ETL_DEPRECATED_FUNCTION;
 #ifndef ETL_NO_DEPRECATED
-       value_type get()const { return (value_type)std::cos(v); }
+       operator value_type()const ETL_DEPRECATED_FUNCTION;
 #endif
+       value_type get()const { return (value_type)std::cos(v); }
 }; // END of class angle::cos
 inline angle::cos::operator angle::value_type()const { return get(); }