hash2D method

int hash2D(
  1. int seed,
  2. int x,
  3. int y
)

Implementation

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