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

Function AngleIn2PI

libs/geometry/angles.cpp:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3namespace ang
4{
5double AngleIn2PI(double ang)
6{
7 double constexpr period = 2.0 * math::pi;
8 ang = fmod(ang, period);
9 if (ang < 0.0)
10 ang += period;
11
12 if (AlmostEqualULPs(period, ang))
13 return 0.0;
14
15 return ang;
16}
17
18double GetShortestDistance(double rad1, double rad2)
19{

Callers 5

ExtractGtoPParamsMethod · 0.85
InterpolateAngleFunction · 0.85
AngleInterpolatorMethod · 0.85
GetRotateDurationMethod · 0.85
UpdateMethod · 0.85

Calls 1

AlmostEqualULPsFunction · 0.70

Tested by

no test coverage detected