MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / dtHashRef

Function dtHashRef

Source/ThirdParty/recastnavigation/DetourNode.cpp:27–36  ·  view source on GitHub ↗

From Thomas Wang, https://gist.github.com/badboy/6267743

Source from the content-addressed store, hash-verified

25#ifdef DT_POLYREF64
26// From Thomas Wang, https://gist.github.com/badboy/6267743
27inline unsigned int dtHashRef(dtPolyRef a)
28{
29 a = (~a) + (a << 18); // a = (a << 18) - a - 1;
30 a = a ^ (a >> 31);
31 a = a * 21; // a = (a + (a << 2)) + (a << 4);
32 a = a ^ (a >> 11);
33 a = a + (a << 6);
34 a = a ^ (a >> 22);
35 return (unsigned int)a;
36}
37#else
38inline unsigned int dtHashRef(dtPolyRef a)
39{

Callers 3

findNodesMethod · 0.85
findNodeMethod · 0.85
getNodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected