MCPcopy Create free account
hub / github.com/comaps/comaps / PointAtSegmentM

Function PointAtSegmentM

tools/openlr/helpers.cpp:224–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224m2::PointD PointAtSegmentM(m2::PointD const & p1, m2::PointD const & p2, double const distanceM)
225{
226 auto const v = p2 - p1;
227 auto const l = v.Length();
228 auto const L = mercator::DistanceOnEarth(p1, p2);
229 auto const delta = distanceM * l / L;
230 return PointAtSegment(p1, p2, delta);
231}
232} // namespace openlr

Callers 1

GetEndPointMethod · 0.85

Calls 3

PointAtSegmentFunction · 0.85
DistanceOnEarthFunction · 0.50
LengthMethod · 0.45

Tested by

no test coverage detected