gradCoord3D method
Implementation
double gradCoord3D(
int seed, int x, int y, int z, double xd, double yd, double zd) {
int hash = seed;
hash ^= X_PRIME * x;
hash ^= Y_PRIME * y;
hash ^= Z_PRIME * z;
hash = hash * hash * hash * 60493;
hash = (hash >> 13) ^ hash;
D3 g = GRAD_3D[(hash & 15)];
return xd * g.x + yd * g.y + zd * g.z;
}