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

Method GetDistance

libs/routing/geometry.cpp:260–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260double RoadGeometry::GetDistance(uint32_t idx) const
261{
262 if (m_distances[idx] < 0)
263 m_distances[idx] = ms::DistanceOnEarth(m_junctions[idx].GetLatLon(), m_junctions[idx + 1].GetLatLon());
264 return m_distances[idx];
265}
266
267SpeedKMpH const & RoadGeometry::GetSpeed(bool forward) const
268{

Callers 2

CalcClimbSegmentFunction · 0.45
CalcSegmentWeightMethod · 0.45

Calls 2

DistanceOnEarthFunction · 0.50
GetLatLonMethod · 0.45

Tested by

no test coverage detected