MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / binsearch

Function binsearch

extlibs/lua/src/ltable.c:822–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820
821
822static unsigned int binsearch (const TValue *array, unsigned int i,
823 unsigned int j) {
824 while (j - i > 1u) { /* binary search */
825 unsigned int m = (i + j) / 2;
826 if (isempty(&array[m - 1])) j = m;
827 else i = m;
828 }
829 return i;
830}
831
832
833/*

Callers 1

luaH_getnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected