sc4 function

double sc4(
  1. double x,
  2. double z,
  3. double r,
  4. NoisePlane n,
)

Implementation

double sc4(double x, double z, double r, NoisePlane n) {
 return ((n.noise2(x + ((r * MAGIC[1]) - (r * MAGIC[0])), z + ((r * MAGIC[0]) + (r * MAGIC[1]))))
 +(n.noise2(x + ((r * MAGIC[7]) - (r * MAGIC[1])), z + ((r * MAGIC[1]) + (r * MAGIC[7]))))
 +(n.noise2(x + ((r * MAGIC[3]) - (r * MAGIC[2])), z + ((r * MAGIC[2]) + (r * MAGIC[3]))))
 +(n.noise2(x + ((r * MAGIC[8]) - (r * MAGIC[3])), z + ((r * MAGIC[3]) + (r * MAGIC[8])))))*0.25;
  }