diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-01-12 23:25:39 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-01-12 23:25:39 +0000 |
| commit | 5eb9b4815a12cc0dafd07905f7715a7e15a92b41 (patch) | |
| tree | f39f5ae5a40012fa010402611d2b133553c22335 /src/2geom/nearest-point.cpp | |
| parent | LPE: rename function getHelperPaths --> getCanvasIndicators (the function is ... (diff) | |
| download | inkscape-5eb9b4815a12cc0dafd07905f7715a7e15a92b41.tar.gz inkscape-5eb9b4815a12cc0dafd07905f7715a7e15a92b41.zip | |
update 2geom's copy to r2142
(bzr r12921)
Diffstat (limited to 'src/2geom/nearest-point.cpp')
| -rw-r--r-- | src/2geom/nearest-point.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/2geom/nearest-point.cpp b/src/2geom/nearest-point.cpp index 68a863434..75e1ebaad 100644 --- a/src/2geom/nearest-point.cpp +++ b/src/2geom/nearest-point.cpp @@ -61,15 +61,14 @@ double nearest_point( Point const& p, } if (c.isConstant()) return from; SBasis dd = dot(c - p, dc); - //std::cout << dd << std::endl; + std::cout << dd << std::endl; std::vector<double> zeros = Geom::roots(dd); double closest = from; double min_dist_sq = L2sq(c(from) - p); - double distsq; - for ( unsigned int i = 0; i < zeros.size(); ++i ) + for ( size_t i = 0; i < zeros.size(); ++i ) { - distsq = L2sq(c(zeros[i]) - p); + double distsq = L2sq(c(zeros[i]) - p); if ( min_dist_sq > L2sq(c(zeros[i]) - p) ) { closest = zeros[i]; |
