diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-14 16:37:50 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-14 16:37:50 +0000 |
| commit | b8d22beef5345210ad27cdc2685083aeae6f8f3b (patch) | |
| tree | d69b8bfd19d3627a8425a1b265c2abf229b05354 /src/2geom/conicsec.cpp | |
| parent | fixes for update to trunk (diff) | |
| parent | "Relative to" option for node alignment. (diff) | |
| download | inkscape-b8d22beef5345210ad27cdc2685083aeae6f8f3b.tar.gz inkscape-b8d22beef5345210ad27cdc2685083aeae6f8f3b.zip | |
update to trunk
(bzr r13708.1.39)
Diffstat (limited to 'src/2geom/conicsec.cpp')
| -rw-r--r-- | src/2geom/conicsec.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/2geom/conicsec.cpp b/src/2geom/conicsec.cpp index 089db71a4..2d396ba30 100644 --- a/src/2geom/conicsec.cpp +++ b/src/2geom/conicsec.cpp @@ -114,8 +114,8 @@ double RatQuad::lambda() const { RatQuad RatQuad::fromPointsTangents(Point P0, Point dP0, Point P, Point P2, Point dP2) { - Line Line0 = Line::from_origin_and_versor(P0, dP0); - Line Line2 = Line::from_origin_and_versor(P2, dP2); + Line Line0 = Line::from_origin_and_vector(P0, dP0); + Line Line2 = Line::from_origin_and_vector(P2, dP2); try { OptCrossing oc = intersection(Line0, Line2); if(!oc) // what to do? @@ -276,8 +276,8 @@ std::vector<Point> decompose_degenerate(xAx const & C1, xAx const & C2, xAx cons n1 = Point(b-d, 1); } - Line L0 = Line::from_origin_and_versor(B0, rot90(n0)); - Line L1 = Line::from_origin_and_versor(B0, rot90(n1)); + Line L0 = Line::from_origin_and_vector(B0, rot90(n0)); + Line L1 = Line::from_origin_and_vector(B0, rot90(n1)); std::vector<double> rts = C1.roots(L0); for(unsigned i = 0; i < rts.size(); i++) { @@ -327,12 +327,12 @@ std::vector<Point> decompose_degenerate(xAx const & C1, xAx const & C2, xAx cons */ assert(L2sq(g) != 0); - Line Lx = Line::from_origin_and_versor(trial_pt, g); // a line along the gradient + Line Lx = Line::from_origin_and_vector(trial_pt, g); // a line along the gradient std::vector<double> rts = xC0.roots(Lx); for(unsigned i = 0; i < rts.size(); i++) { Point P0 = Lx.pointAt(rts[i]); //std::cout << P0 << "\n"; - Line L = Line::from_origin_and_versor(P0, rot90(g)); + Line L = Line::from_origin_and_vector(P0, rot90(g)); std::vector<double> cnrts; // It's very likely that at least one of the conics is degenerate, this will hopefully pick the more generate of the two. if(fabs(C1.hessian().det()) > fabs(C2.hessian().det())) @@ -515,7 +515,7 @@ xAx xAx::operator*(double const &b) const { if(L2sq(dA) <= 1e-10) { // perhaps a single point? return boost::optional<RatQuad> (); } - LineSegment ls = intersection(Line::from_origin_and_versor(A, dA), bnd); + LineSegment ls = intersection(Line::from_origin_and_vector(A, dA), bnd); return RatQuad::fromPointsTangents(A, dA, ls.pointAt(0.5), ls[1], dA); } else if(crs.size() >= 2 && crs.size() < 4) { |
