Advertisement
Barteks2x

Untitled

Oct 7th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.87 KB | None | 0 0
  1.                         double d9 = yOffset + (double)j4 * yScale + this.yCoord;
  2.                         int k4 = (int)d9;
  3.  
  4.                         if (d9 < (double)k4)
  5.                         {
  6.                             --k4;
  7.                         }
  8.  
  9.                         int l4 = k4 & 255;
  10.                         d9 = d9 - (double)k4;
  11.                         double d10 = d9 * d9 * d9 * (d9 * (d9 * 6.0D - 15.0D) + 10.0D);
  12.  
  13.                         if (j4 == 0 || l4 != k)
  14.                         {
  15.                             k = l4;
  16.                             l = this.permutations[j3] + l4;
  17.                             i1 = this.permutations[l] + i4;
  18.                             j1 = this.permutations[l + 1] + i4;
  19.                             k1 = this.permutations[j3 + 1] + l4;
  20.                             l1 = this.permutations[k1] + i4;
  21.                             i2 = this.permutations[k1 + 1] + i4;
  22.                             d1 = this.lerp(d6, this.grad(this.permutations[i1], d5, d9, d7), this.grad(this.permutations[l1], d5 - 1.0D, d9, d7));
  23.                             d2 = this.lerp(d6, this.grad(this.permutations[j1], d5, d9 - 1.0D, d7), this.grad(this.permutations[i2], d5 - 1.0D, d9 - 1.0D, d7));
  24.                             d3 = this.lerp(d6, this.grad(this.permutations[i1 + 1], d5, d9, d7 - 1.0D), this.grad(this.permutations[l1 + 1], d5 - 1.0D, d9, d7 - 1.0D));
  25.                             d4 = this.lerp(d6, this.grad(this.permutations[j1 + 1], d5, d9 - 1.0D, d7 - 1.0D), this.grad(this.permutations[i2 + 1], d5 - 1.0D, d9 - 1.0D, d7 - 1.0D));
  26.                         }
  27.  
  28.                         double d11 = this.lerp(d10, d1, d2);
  29.                         double d12 = this.lerp(d10, d3, d4);
  30.                         double d13 = this.lerp(d8, d11, d12);
  31.                         int j7 = i++;
  32.                         noiseArray[j7] += d13 * d0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement