Skip to content

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Oct 10, 2022
1 parent 3f6f131 commit 111eeeb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8
projGroupId=io.github.over-run
projArtifactId=perlinoisej
projName=perlinoisej
projVersion=0.1.0
projVersion=0.2.0
projDesc=Java implementation for STB perlin noise
projVcs=Over-Run/perlinoisej
projBranch=0.x
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/io/github/overrun/perlinoisej/PerlinNoise.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

/**
* <pre>{@code float stb_perlin_noise3( float x,
* float y,
* float z,
* int x_wrap=0,
* int y_wrap=0,
* int z_wrap=0)}</pre>
* float y,
* float z,
* int x_wrap=0,
* int y_wrap=0,
* int z_wrap=0)}</pre>
* <p>
* This function computes a random value at the coordinate (x,y,z).<br>
* Adjacent random values are continuous but the noise fluctuates
Expand Down Expand Up @@ -206,8 +206,9 @@ private static float noise3internal(float x, float y, float z, int x_wrap, int y
z -= pz;
w = (((z * 6 - 15) * z + 10) * z * z * z);

r0 = RANDTAB[x0 + seed] & 0xff;
r1 = RANDTAB[x1 + seed] & 0xff;
int seed_i = seed & 0xff;
r0 = RANDTAB[x0 + seed_i] & 0xff;
r1 = RANDTAB[x1 + seed_i] & 0xff;

r00 = RANDTAB[r0 + y0] & 0xff;
r01 = RANDTAB[r0 + y1] & 0xff;
Expand Down

0 comments on commit 111eeeb

Please sign in to comment.