sc21 function
Implementation
double sc21(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[106]) - (r * MAGIC[105])), z + ((r * MAGIC[105]) + (r * MAGIC[106]))))
+(n.noise2(x + ((r * MAGIC[108]) - (r * MAGIC[107])), z + ((r * MAGIC[107]) + (r * MAGIC[108]))))
+(n.noise2(x + ((r * MAGIC[17]) - (r * MAGIC[16])), z + ((r * MAGIC[16]) + (r * MAGIC[17]))))
+(n.noise2(x + ((r * MAGIC[78]) - (r * MAGIC[79])), z + ((r * MAGIC[79]) + (r * MAGIC[78]))))
+(n.noise2(x + ((r * MAGIC[69]) - (r * MAGIC[109])), z + ((r * MAGIC[109]) + (r * MAGIC[69]))))
+(n.noise2(x + ((r * MAGIC[19]) - (r * MAGIC[18])), z + ((r * MAGIC[18]) + (r * MAGIC[19]))))
+(n.noise2(x + ((r * MAGIC[111]) - (r * MAGIC[110])), z + ((r * MAGIC[110]) + (r * MAGIC[111]))))
+(n.noise2(x + ((r * MAGIC[51]) - (r * MAGIC[80])), z + ((r * MAGIC[80]) + (r * MAGIC[51]))))
+(n.noise2(x + ((r * MAGIC[21]) - (r * MAGIC[20])), z + ((r * MAGIC[20]) + (r * MAGIC[21]))))
+(n.noise2(x + ((r * MAGIC[37]) - (r * MAGIC[33])), z + ((r * MAGIC[33]) + (r * MAGIC[37]))))
+(n.noise2(x + ((r * MAGIC[113]) - (r * MAGIC[112])), z + ((r * MAGIC[112]) + (r * MAGIC[113]))))
+(n.noise2(x + ((r * MAGIC[23]) - (r * MAGIC[22])), z + ((r * MAGIC[22]) + (r * MAGIC[23]))))
+(n.noise2(x + ((r * MAGIC[115]) - (r * MAGIC[114])), z + ((r * MAGIC[114]) + (r * MAGIC[115]))))
+(n.noise2(x + ((r * MAGIC[117]) - (r * MAGIC[116])), z + ((r * MAGIC[116]) + (r * MAGIC[117]))))
+(n.noise2(x + ((r * MAGIC[25]) - (r * MAGIC[24])), z + ((r * MAGIC[24]) + (r * MAGIC[25]))))
+(n.noise2(x + ((r * MAGIC[83]) - (r * MAGIC[118])), z + ((r * MAGIC[118]) + (r * MAGIC[83]))))
+(n.noise2(x + ((r * MAGIC[120]) - (r * MAGIC[119])), z + ((r * MAGIC[119]) + (r * MAGIC[120]))))
+(n.noise2(x + ((r * MAGIC[11]) - (r * MAGIC[12])), z + ((r * MAGIC[12]) + (r * MAGIC[11]))))
+(n.noise2(x + ((r * MAGIC[122]) - (r * MAGIC[121])), z + ((r * MAGIC[121]) + (r * MAGIC[122]))))
+(n.noise2(x + ((r * MAGIC[84]) - (r * MAGIC[36])), z + ((r * MAGIC[36]) + (r * MAGIC[84]))))
+(n.noise2(x + ((r * MAGIC[27]) - (r * MAGIC[26])), z + ((r * MAGIC[26]) + (r * MAGIC[27])))))*0.04761905;
}