MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / isPowerOfTwo

Function isPowerOfTwo

src/renderers/rendererUtils.ts:74–74  ·  view source on GitHub ↗
(n: number)

Source from the content-addressed store, hash-verified

72const DEFAULT_FRAGMENT_ENTRY = 'fsMain';
73
74const isPowerOfTwo = (n: number): boolean => Number.isInteger(n) && n > 0 && (n & (n - 1)) === 0;
75
76const alignTo = (value: number, alignment: number): number => {
77 if (!Number.isFinite(value) || value < 0) {

Callers 1

alignToFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected