Fix normal noise amplitude 0 check

This commit is contained in:
Misode
2020-09-16 16:04:10 +02:00
parent 4c746e817c
commit c48e082fe3

View File

@@ -33,9 +33,9 @@ export class NormalNoise {
for (let i = 0; i < this.amplitudes.length; i += 1) {
if (this.amplitudes[i] !== 0) {
value += this.amplitudes[i] * this.noiseLevels[i].noise2D(this.wrap(x * inputF), this.wrap(y * inputF) + i) * valueF
inputF *= 2
valueF /= 2
}
inputF *= 2
valueF /= 2
}
return 2 * value * this.valueFactor
}