Skip to content

Commit 2391421

Browse files
committed
Code refactoring: using of named constant
1 parent 3f72d63 commit 2391421

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/graph_spectrum_calc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ GraphSpectrumCalc._dataLoadPowerSpectralDensityVsX = function(vsFieldNames, minV
235235
let maxNoise = 0; // Stores the maximum amplitude of the fft over all chunks
236236
const psdLength = Math.floor(fftChunkLength / 2);
237237
// Matrix where each row represents a bin of vs values, and the columns are amplitudes at frequencies
238-
const backgroundValue = -200;
238+
const BACKGROUND_PSD_VALUE = -200;
239239
const matrixPsdOutput = new Array(NUM_VS_BINS)
240240
.fill(null)
241-
.map(() => (new Float64Array(psdLength)).fill(backgroundValue));
241+
.map(() => (new Float64Array(psdLength)).fill(BACKGROUND_PSD_VALUE));
242242

243243
const numberSamples = new Uint32Array(NUM_VS_BINS); // Number of samples in each vs value, used to average them later.
244244

0 commit comments

Comments
 (0)