Remove some debugging code I left in accidentally some time ago.
[synfig.git] / synfig-core / trunk / src / synfig / vector.h
index c509c3c..13a3805 100644 (file)
@@ -27,6 +27,7 @@
 
 /* === H E A D E R S ======================================================= */
 
+#include "angle.h"
 #include "real.h"
 #include <math.h>
 
@@ -78,11 +79,11 @@ public:
 
        value_type &
        operator[](const int& i)
-       { return (&_x)[i] ; }
+       { return i?_y:_x; }
 
        const value_type &
        operator[](const int& i) const
-       { return (&_x)[i] ; }
+       { return i?_y:_x; }
 
        const Vector &
        operator+=(const Vector &rhs)
@@ -169,6 +170,9 @@ public:
        Vector perp()const
                { return Vector(_y,-_x); }
 
+       Angle angle()const
+               { return Angle::rad(atan2(_y, _x)); }
+
        bool is_equal_to(const Vector& rhs)const
        {
                static const value_type epsilon(0.0000000000001);