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

Function getBitLength

packages/react-reconciler/src/ReactFiberTreeContext.js:220–222  ·  view source on GitHub ↗
(number: number)

Source from the content-addressed store, hash-verified

218}
219
220function getBitLength(number: number): number {
221 return 32 - clz32(number);
222}
223
224function getLeadingBit(id: number) {
225 return 1 << (getBitLength(id) - 1);

Callers 2

pushTreeIdFunction · 0.70
getLeadingBitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected