[core] Use geometry.hpp's point

This commit is contained in:
John Firebaugh
2016-03-16 17:45:00 -07:00
parent f89cfacab2
commit 9330d674a9
41 changed files with 264 additions and 367 deletions

View File

@@ -31,7 +31,7 @@ float distToSegmentSquared(const GeometryCoordinate& p, const GeometryCoordinate
const float t = float((p.x - v.x) * (w.x - v.x) + (p.y - v.y) * (w.y - v.y)) / l2;
if (t < 0) return util::distSqr<float>(p, v);
if (t > 1) return util::distSqr<float>(p, w);
return util::distSqr<float>(p, vec2<float>(w - v) * t + v);
return util::distSqr<float>(p, convertPoint<float>(w - v) * t + convertPoint<float>(v));
}
bool pointIntersectsBufferedLine(const GeometryCoordinate& p, const GeometryCoordinates& line, const float radius) {