if (r < 0)
r += (i + 1);
perm[i] = source[r];
permGradIndex3D[i] = (short) ((perm[i] % (gradients3D.length / 3)) * 3);
source[r] = source[i];
<BUG>}
}</BUG>
public double eval(double x, double y) {
double stretchOffset = (x + y) * STRETCH_CONSTANT_2D;
double xs = x + stretchOffset;

if (r < 0)
r += (i + 1);
perm[i] = source[r];
permGradIndex3D[i] = (short) ((perm[i] % (gradients3D.length / 3)) * 3);
source[r] = source[i];
}
}
private static int fastFloor(double x) {
int xi = (int) x;
return x < xi ? xi - 1 : xi;
}
public double eval(double x, double y) {
double stretchOffset = (x + y) * STRETCH_CONSTANT_2D;
double xs = x + stretchOffset;
