MCPcopy Create free account
hub / github.com/CelestiaProject/Celestia / angleDiff

Function angleDiff

src/celengine/skygrid.cpp:159–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157
158// Compute the difference between two angles in [-PI, PI]
159template<class T> static T
160angleDiff(T a, T b)
161{
162 T diff = std::fabs(a - b);
163 if (diff > PI)
164 return (T) (2.0 * PI - diff);
165 else
166 return diff;
167}
168
169template<class T> static T
170min4(T a, T b, T c, T d)

Callers 1

updateAngleRangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected