MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / prev

Function prev

Engine/lib/recast/Recast/Source/RecastMesh.cpp:164–164  ·  view source on GitHub ↗

Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).

Source from the content-addressed store, hash-verified

162
163// Last time I checked the if version got compiled using cmov, which was a lot faster than module (with idiv).
164inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; }
165inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }
166
167inline int area2(const int* a, const int* b, const int* c)

Callers 5

inConeFunction · 0.70
inConeLooseFunction · 0.70
triangulateFunction · 0.70
NormalizeMethod · 0.50
valueMethod · 0.50

Calls

no outgoing calls

Tested by 1

NormalizeMethod · 0.40