MCPcopy
hub / github.com/facebook/react / clz32Fallback

Function clz32Fallback

packages/react-reconciler/src/clz32.js:21–27  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

19const log = Math.log;
20const LN2 = Math.LN2;
21function clz32Fallback(x: number): number {
22 const asUint = x >>> 0;
23 if (asUint === 0) {
24 return 32;
25 }
26 return (31 - ((log(asUint) / LN2) | 0)) | 0;
27}

Callers

nothing calls this directly

Calls 1

logFunction · 0.50

Tested by

no test coverage detected