MCPcopy Create free account
hub / github.com/CruiserOne/Astrolog / Mod

Function Mod

general.cpp:288–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286// parameter to within the range of 0 to 360.
287
288real Mod(real d)
289{
290 if (d >= rDegMax) // In most cases, value is only slightly
291 d -= rDegMax; // out of range, so can test for it and
292 else if (d < 0.0) // avoid the more complicated arithmetic.
293 d += rDegMax;
294 if (d >= 0 && d < rDegMax)
295 return d;
296 return (d - RFloor(d/rDegMax)*rDegMax);
297}
298
299
300// Integer division, like the "/" operator but always rounds result down.

Callers 15

NProcessSwitchesRareFunction · 0.85
CastRelationFunction · 0.85
ChartAstroGraphRelationFunction · 0.85
EclToHorizFunction · 0.85
ComputeArabicFunction · 0.85
DisplayArabicFunction · 0.85
FOutputDaedalusStarFunction · 0.85
FInputDataFunction · 0.85
DrawZodiacFunction · 0.85
DrawWheelFunction · 0.85
LookupConstelFunction · 0.85
FGlobeCalcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected