MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / PrevIndex

Function PrevIndex

editor/rad_hemicube.cpp:695–700  ·  view source on GitHub ↗

Returns number preceding val modulo modulus. prevmod(3,4) = 2 prevmod(0,4) = 3

Source from the content-addressed store, hash-verified

693// prevmod(3,4) = 2
694// prevmod(0,4) = 3
695int PrevIndex(int val, int modulus) {
696 if (val > 0)
697 return val - 1;
698 else
699 return modulus - 1;
700}
701
702// Returns number succeeding val modulo modulus.
703// succmod(3,4) = 0

Callers 2

GetVertexOrderingFunction · 0.85
ScanRadiosityPolyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected