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

Function clz32Fallback

packages/react-server/src/ReactFizzTreeContext.js:162–168  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

160const log = Math.log;
161const LN2 = Math.LN2;
162function clz32Fallback(x: number): number {
163 const asUint = x >>> 0;
164 if (asUint === 0) {
165 return 32;
166 }
167 return (31 - ((log(asUint) / LN2) | 0)) | 0;
168}

Callers

nothing calls this directly

Calls 1

logFunction · 0.50

Tested by

no test coverage detected