Allow the 'BLine Tangent' to be used to convert angles. The resulting value is the...
[synfig.git] / synfig-core / trunk / src / synfig / vector.h
index c509c3c..61314f1 100644 (file)
@@ -27,6 +27,7 @@
 
 /* === H E A D E R S ======================================================= */
 
+#include "angle.h"
 #include "real.h"
 #include <math.h>
 
@@ -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);