]> Shamusworld >> Repos - architektonas/blobdiff - src/structs.h
Re-added "Fixed Angle" tool. :-)
[architektonas] / src / structs.h
index 62366adaca188179d705dfe97e6c76f4819b1ab6..20a03d264ba0016e3a03835bacf6f7d209750540 100644 (file)
@@ -60,6 +60,9 @@ struct Line {
        Line(Vector pt1, Vector pt2, float th = 1.0, uint32_t c = 0, int l = LSSolid):
                type(OTLine), id(Global::objectID++), layer(0), color(c), thickness(th),
                style(l), selected(false), hovered(false), hitObject(false) { p[0] = pt1; p[1] = pt2; hitPoint[0] = hitPoint[1] = false; }
+       Vector Vect(void) { return Vector(p[0], p[1]); }
+       Vector Unit(void) { return Vector(p[0], p[1]).Unit(); }
+       double Length(void) { return Vector(p[0], p[1]).Magnitude(); }
 };
 
 struct Circle {