mirror of
https://github.com/Findus23/nn_evaluate.git
synced 2024-09-20 16:03:44 +02:00
improve the design
This commit is contained in:
parent
5f7fa3bbe5
commit
f22d5dd81a
1 changed files with 6 additions and 5 deletions
|
@ -24,15 +24,16 @@ function update(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
const mass = Math.pow(10, Number(massExpEl.value))
|
const mass = Math.pow(10, Number(massExpEl.value))
|
||||||
massExpLabel.innerText = String(mass) + " kg"
|
massExpLabel.innerText = mass.toExponential(3) + " kg"
|
||||||
|
console.log(mass.toFixed(3))
|
||||||
const gamma = Number(gammaPercentEl.value) / 100
|
const gamma = Number(gammaPercentEl.value) / 100
|
||||||
gammaPercentLabel.innerText = String(gamma)
|
gammaPercentLabel.innerText = gamma.toFixed(4)
|
||||||
const wtFraction = Math.pow(10, Number(wtFractionEl.value))
|
const wtFraction = Math.pow(10, Number(wtFractionEl.value))
|
||||||
wtFractionLabel.innerText = String(wtFraction)
|
wtFractionLabel.innerText = wtFraction.toExponential(4)
|
||||||
const wpFraction = Math.pow(10, Number(wpFractionEl.value))
|
const wpFraction = Math.pow(10, Number(wpFractionEl.value))
|
||||||
wpFractionLabel.innerText = String(wpFraction)
|
wpFractionLabel.innerText = wpFraction.toExponential(4)
|
||||||
const resolution = Number(resolutionEl.value)
|
const resolution = Number(resolutionEl.value)
|
||||||
resolutionLabel.innerText = String(resolution) + " px"
|
resolutionLabel.innerText = resolution.toString() + " px"
|
||||||
const mode = Number(modeEl.value)
|
const mode = Number(modeEl.value)
|
||||||
const output = calculate_grid(mass, gamma, wpFraction, wtFraction, resolution, mode)
|
const output = calculate_grid(mass, gamma, wpFraction, wtFraction, resolution, mode)
|
||||||
const image = new ImageData(valuesToImage(output), resolution, resolution)
|
const image = new ImageData(valuesToImage(output), resolution, resolution)
|
||||||
|
|
Loading…
Reference in a new issue