Normed to the thresholds table
| 17 | |
| 18 | // Normed to the thresholds table |
| 19 | std::uint64_t fastPerpendicularDistance(const util::FloatCoordinate &projected_start, |
| 20 | const util::FloatCoordinate &projected_target, |
| 21 | const util::FloatCoordinate &projected) |
| 22 | { |
| 23 | util::FloatCoordinate projected_point_on_segment; |
| 24 | std::tie(std::ignore, projected_point_on_segment) = |
| 25 | util::coordinate_calculation::projectPointOnSegment( |
| 26 | projected_start, projected_target, projected); |
| 27 | auto squared_distance = util::coordinate_calculation::squaredEuclideanDistance( |
| 28 | projected, projected_point_on_segment); |
| 29 | return squared_distance; |
| 30 | } |
| 31 | |
| 32 | std::vector<util::Coordinate> douglasPeucker(std::vector<util::Coordinate>::const_iterator begin, |
| 33 | std::vector<util::Coordinate>::const_iterator end, |
no test coverage detected