X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgeometry.cpp;h=e0ad270c019d3e297c61786efe00974218384caf;hb=da1348151182fe5340495ff8243e662b96c1fbfa;hp=e572fab6bbc64d93e8a6e1d85a01dfd6edf2bf2a;hpb=06456047e6476969e45be5b1f31b8336ea74c45f;p=architektonas diff --git a/src/geometry.cpp b/src/geometry.cpp index e572fab..e0ad270 100644 --- a/src/geometry.cpp +++ b/src/geometry.cpp @@ -83,10 +83,14 @@ Point Geometry::MirrorPointAroundLine(Point point, Point tail, Point head) } +// +// point: The point we're rotating +// rotationPoint: The point we're rotating around +// Point Geometry::RotatePointAroundPoint(Point point, Point rotationPoint, double angle) { - Vector v = Vector(point, rotationPoint); -// Vector v = Vector(rotationPoint, point); +// Vector v = Vector(point, rotationPoint); + Vector v = Vector(rotationPoint, point); double px = (v.x * cos(angle)) - (v.y * sin(angle)); double py = (v.x * sin(angle)) + (v.y * cos(angle));