MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / nextPow2

Function nextPow2

src/renderers/createScatterRenderer.ts:44–48  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

42 parseCssColorToRgba01(color) ?? ([0, 0, 0, 1] as const);
43
44const nextPow2 = (v: number): number => {
45 if (!Number.isFinite(v) || v <= 0) return 1;
46 const n = Math.ceil(v);
47 return 2 ** Math.ceil(Math.log2(n));
48};
49
50const isTupleDataPoint = (point: DataPoint): point is DataPointTuple => Array.isArray(point);
51

Callers 2

prepareFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected