gradCoord1D method

double gradCoord1D(
  1. int seed,
  2. int x,
  3. double xd
)

Implementation

double gradCoord1D(int seed, int x, double xd) {
  int hash = seed;
  hash ^= X_PRIME * x;
  hash = hash * hash * hash * 60493;
  hash = (hash >> 13) ^ hash;
  return xd * GRAD_1D[hash & 2];
}