diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/2geom/conicsec.cpp | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/2geom/conicsec.cpp')
| -rw-r--r-- | src/2geom/conicsec.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/2geom/conicsec.cpp b/src/2geom/conicsec.cpp index 7625df2fb..367dc2503 100644 --- a/src/2geom/conicsec.cpp +++ b/src/2geom/conicsec.cpp @@ -211,8 +211,6 @@ RatQuad RatQuad::fromPointsTangents(Point P0, Point dP0, } RatQuad RatQuad::circularArc(Point P0, Point P1, Point P2) { - Line Line0 = Line::from_origin_and_versor(P0, P1 - P0); - Line Line2 = Line::from_origin_and_versor(P2, P1 - P2); return RatQuad(P0, P1, P2, dot(unit_vector(P0 - P1), unit_vector(P0 - P2))); } @@ -583,7 +581,7 @@ xAx xAx::operator*(double const &b) const { LineSegment ls = intersection(Line::from_origin_and_versor(A, dA), bnd); return RatQuad::fromPointsTangents(A, dA, ls.pointAt(0.5), ls[1], dA); } - else if(crs.size() >= 2 and crs.size() < 4) { + else if(crs.size() >= 2 && crs.size() < 4) { Point A = crs[0]; Point C = crs[1]; if(crs.size() == 3) { @@ -607,7 +605,7 @@ xAx xAx::operator*(double const &b) const { Point dA = gradient(A); Point dC = gradient(C); - if(L2sq(dA) <= 1e-10 or L2sq(dC) <= 1e-10) { + if(L2sq(dA) <= 1e-10 || L2sq(dC) <= 1e-10) { return RatQuad::fromPointsTangents(A, C-A, B, C, A-C); } @@ -710,7 +708,7 @@ boost::optional<Point> xAx::bottom() const { } Interval xAx::extrema(Rect r) const { - if (c[0] == 0 and c[1] == 0 and c[2] == 0) { + if (c[0] == 0 && c[1] == 0 && c[2] == 0) { Interval ext(valueAt(r.corner(0))); for(int i = 1; i < 4; i++) ext |= Interval(valueAt(r.corner(i))); @@ -725,7 +723,7 @@ Interval xAx::extrema(Rect r) const { k = r[1][1]; ext |= quad_ex(c[0], c[1]*k+c[3], (c[2]*k + c[4])*k + c[5], r[0]); boost::optional<Point> B0 = bottom(); - if (B0 and r.contains(*B0)) + if (B0 && r.contains(*B0)) ext.expandTo(0); return ext; } |
