summaryrefslogtreecommitdiffstats
path: root/src/2geom/circle.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2016-02-15 09:03:42 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2016-02-15 09:03:42 +0000
commit7f4a4369b9b0b97301690a32f1fd25f1161b41f3 (patch)
tree6dd2a3fa0f357c33168c8915f52a998e71d08dbe /src/2geom/circle.cpp
parentFix improperly escaped character in previous commit (which actually fixes bug... (diff)
downloadinkscape-7f4a4369b9b0b97301690a32f1fd25f1161b41f3.tar.gz
inkscape-7f4a4369b9b0b97301690a32f1fd25f1161b41f3.zip
Sync 2Geom to e7245a01127647cd20b0d851a0a622d9ded38d23.
Restores correct meaning of Line::versor(). (bzr r14652)
Diffstat (limited to 'src/2geom/circle.cpp')
-rw-r--r--src/2geom/circle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/2geom/circle.cpp b/src/2geom/circle.cpp
index 553981a72..934a8d3ab 100644
--- a/src/2geom/circle.cpp
+++ b/src/2geom/circle.cpp
@@ -144,7 +144,7 @@ bool Circle::contains(Circle const &other) const
bool Circle::intersects(Line const &l) const
{
// http://mathworld.wolfram.com/Circle-LineIntersection.html
- Coord dr = l.versor().length();
+ Coord dr = l.vector().length();
Coord r = _radius;
Coord D = cross(l.initialPoint(), l.finalPoint());
Coord delta = r*r * dr*dr - D*D;
@@ -163,9 +163,9 @@ bool Circle::intersects(Circle const &other) const
std::vector<ShapeIntersection> Circle::intersect(Line const &l) const
{
// http://mathworld.wolfram.com/Circle-LineIntersection.html
- Coord dr = l.versor().length();
- Coord dx = l.versor().x();
- Coord dy = l.versor().y();
+ Coord dr = l.vector().length();
+ Coord dx = l.vector().x();
+ Coord dy = l.vector().y();
Coord D = cross(l.initialPoint() - _center, l.finalPoint() - _center);
Coord delta = _radius*_radius * dr*dr - D*D;