summaryrefslogtreecommitdiffstats
path: root/src/2geom/point.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom/point.cpp')
-rw-r--r--src/2geom/point.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/2geom/point.cpp b/src/2geom/point.cpp
index b8a858f8d..4a0625713 100644
--- a/src/2geom/point.cpp
+++ b/src/2geom/point.cpp
@@ -150,19 +150,19 @@ Point &Point::operator*=(Matrix const &m)
return *this;
}
-Point constrain_angle(Point const &ref, Point const &pt, unsigned int n, Point const &dir)
+Point constrain_angle(Point const &A, Point const &B, unsigned int n, Point const &dir)
{
- // for special cases we could perhaps use faster routines
+ // for special cases we could perhaps use explicit testing (which might be faster)
if (n == 0.0) {
- return pt;
+ return B;
}
- Point diff(pt - ref);
+ Point diff(B - A);
double angle = -angle_between(diff, dir);
double k = round(angle * (double)n / (2.0*M_PI));
- return ref + dir * Rotate(k * 2.0 * M_PI / (double)n) * L2(diff);
+ return A + dir * Rotate(k * 2.0 * M_PI / (double)n) * L2(diff);
}
-} //Namespace Geom
+} //namespace Geom
/*
Local Variables: