hash3D method

int hash3D(
  1. int seed,
  2. int x,
  3. int y,
  4. int z,
)

Implementation

int hash3D(int seed, int x, int y, int z) {
  int hash = seed;
  hash ^= X_PRIME * x;
  hash ^= Y_PRIME * y;
  hash ^= Z_PRIME * z;
  hash = hash * hash * hash * 60493;
  hash = (hash >> 13) ^ hash;
  return hash;
}