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

Function normalizationToU32

src/renderers/createScatterDensityRenderer.ts:155–161  ·  view source on GitHub ↗
(n: ResolvedScatterSeriesConfig['densityNormalization'])

Source from the content-addressed store, hash-verified

153};
154
155const normalizationToU32 = (n: ResolvedScatterSeriesConfig['densityNormalization']): number => {
156 // Must match shader:
157 // 0: linear, 1: sqrt, 2: log
158 if (n === 'sqrt') return 1;
159 if (n === 'log') return 2;
160 return 0;
161};
162
163export function createScatterDensityRenderer(
164 device: GPUDevice,

Callers 1

prepareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected