Forgive the mess, but I'm not savvy in makefile testing, I use cmake+boost,
so.
Given:
inc=0.05;
for (x=-10.0;x<10.0;x+=inc){
for (y=-10.0;x<10.0;x+=inc){
for (z=-10.0;x<10.0;x+=inc){
int x0 = (x > 0.0? (int)x: (int)x - 1);
int y0 = (y > 0.0? (int)y: (int)y - 1);
int z0 = (z > 0.0? (int)z: (int)z - 1);
result=noise::GradientNoise3D(x, y, z, x0, y0, z0);
if(result<-1.0||result>1.0){
std::cout<<
"GradientNoise3D("<<x<<","<<y<<","<<z<<","<<x0<<","<<y0<<","<<z0<<")="<<result<<std::endl;
}
}
}
}
with 2.12 on line 144 of noisegen.cpp as the scale, I have 4767470 failures.
with 0.57735026919 as the scale, I have 0 failures, and this fixes the test
cases for GradientCoherentNoise3D (Bug #1093633) as well.
I believe this to be the correct scale for a factor with 3 elements
(1/sqrt(3))