X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgeometry.cpp;h=4cd229f76da7967d10811ed3ff803a0d46427e92;hb=6114b754fcd6e7d83c71dc2fa0ef2ec185387e12;hp=b52ff7e97d058aaa7626b2568a0b667bc647c0d1;hpb=acd27aa62a4c78b6aeee523e3145a8aa53f4bcde;p=architektonas diff --git a/src/geometry.cpp b/src/geometry.cpp index b52ff7e..4cd229f 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -341,6 +341,13 @@ Point Geometry::GetPointForParameter(Object * obj, double t) } +Point Geometry::Midpoint(Line * line) +{ + return Point((line->p[0].x + line->p[1].x) / 2.0, + (line->p[0].y + line->p[1].y) / 2.0); +} + + /* How to find the tangent of a point off a circle: