mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 12:59:06 +01:00
fix variable
This commit is contained in:
parent
cffdd055c9
commit
a2a4b2e6c2
@ -352,7 +352,7 @@ export function binsFromFootprint(weights, scope, values, numBins) {
|
|||||||
|
|
||||||
const rawBins = new Array(numBins).fill(0)
|
const rawBins = new Array(numBins).fill(0)
|
||||||
for (let i = 0; i < values.length; i++)
|
for (let i = 0; i < values.length; i++)
|
||||||
bins[Math.floor(((values[i] - min) / (max - min)) * numBins)] += scopeWeights ? scopeWeights[i] : 1
|
rawBins[Math.floor(((values[i] - min) / (max - min)) * numBins)] += scopeWeights ? scopeWeights[i] : 1
|
||||||
|
|
||||||
const bins = rawBins.map((count, idx) => ({
|
const bins = rawBins.map((count, idx) => ({
|
||||||
value: Math.floor(min + ((idx + 1) / numBins) * (max - min)),
|
value: Math.floor(min + ((idx + 1) / numBins) * (max - min)),
|
||||||
|
Loading…
Reference in New Issue
Block a user