gradCoord2D method
Implementation
double gradCoord2D(int seed, int x, int y, double xd, double yd) {
int hash = seed;
hash ^= X_PRIME * x;
hash ^= Y_PRIME * y;
hash = hash * hash * hash * 60493;
hash = (hash >> 13) ^ hash;
D2 g = GRAD_2D[hash & 7];
return xd * g.x + yd * g.y;
}