}
-Point Geometry::MirrorPointAroundLine(Point point, Point p1, Point p2)
+Point Geometry::MirrorPointAroundLine(Point point, Point tail, Point head)
{
// Get the vector of the intersection of the line and the normal on the
// line to the point in question.
- double t = ParameterOfLineAndPoint(p1, p2, point);
- Vector v = Vector(p1, p2) * t;
+ double t = ParameterOfLineAndPoint(tail, head, point);
+ Vector v = Vector(tail, head) * t;
- // Get the point normal to point to the line passed in (p2 is the tail)
- Point normalOnLine = p2 + v;
+ // Get the point normal to point to the line passed in
+ Point normalOnLine = tail + v;
// Make our mirrored vector (head - tail)
Vector mirror = -(point - normalOnLine);