internal static Double InternalGradientNoise(
Double x, Double y, Double z, Double w, Double u, Double v,
Int32 ix, Int32 iy, Int32 iz, Int32 iw, Int32 iu, Int32 iv,
Int32 seed)
{
var hash = Noise.HashCoordinates(ix, iy, iz, iw, iu, iv, seed);
var dx = x - ix;
var dy = y - iy;
var dz = z - iz;
var dw = w - iw;
var du = u - iu;
var dv = v - iv;
return (dx * NoiseLookupTable.Gradient6D[hash, 0] +
dy * NoiseLookupTable.Gradient6D[hash, 1] +
dz * NoiseLookupTable.Gradient6D[hash, 2] +
dw * NoiseLookupTable.Gradient6D[hash, 3] +
du * NoiseLookupTable.Gradient6D[hash, 4] +
dv * NoiseLookupTable.Gradient6D[hash, 5]);
}