Update src/main/java/com/generation/SimplexNoise.java

Co-Authored-By: Libin Yang <contact@yanglibin.info>
This commit is contained in:
Abhijay Kumar 2019-05-23 09:40:46 +05:30 committed by GitHub
parent 5358f8ddc9
commit c25da3ce97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ public class SimplexNoise {
for (int index = 0; index < this.octaves.length; index++) { for (int index = 0; index < this.octaves.length; index++) {
double frequency = Math.pow(2, index); double frequency = Math.pow(2, index);
double amplitude = Math.pow(this.persistance, (double)this.octaves.length - index); double amplitude = Math.pow(this.persistance, (double) this.octaves.length - index);
result += this.octaves[index].noise(x / frequency, y / frequency, z / frequency) * amplitude; result += this.octaves[index].noise(x / frequency, y / frequency, z / frequency) * amplitude;
} }