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

Function CalcOneSegmentTurnAngle

libs/routing/turns_generator_utils.cpp:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184double CalcOneSegmentTurnAngle(TurnInfo const & turnInfo)
185{
186 ASSERT_GREATER_OR_EQUAL(turnInfo.m_ingoing->m_path.size(), 2, ());
187 ASSERT_GREATER_OR_EQUAL(turnInfo.m_outgoing->m_path.size(), 2, ());
188
189 return math::RadToDeg(
190 PiMinusTwoVectorsAngle(turnInfo.m_ingoing->m_path.back().GetPoint(),
191 turnInfo.m_ingoing->m_path[turnInfo.m_ingoing->m_path.size() - 2].GetPoint(),
192 turnInfo.m_outgoing->m_path[1].GetPoint()));
193}
194
195double CalcPathTurnAngle(LoadedPathSegment const & segment, size_t const pathIndex)
196{

Callers 4

GetTurnDirectionBasicFunction · 0.85
GetTurnDirectionMethod · 0.85

Calls 5

RadToDegFunction · 0.85
PiMinusTwoVectorsAngleFunction · 0.85
backMethod · 0.80
sizeMethod · 0.45
GetPointMethod · 0.45

Tested by

no test coverage detected