Improve cellular output bounds checking

This commit is contained in:
Danny Robson 2012-05-24 17:08:47 +10:00
parent 59d2862508
commit 9616c045d9

View File

@ -191,7 +191,7 @@ cellular::cellular ()
range<double>
cellular::bounds (void) const
{ return { 0.0, sqrt(2) }; }
{ return { 0.0, 1.5 }; }
double
@ -236,5 +236,7 @@ cellular::eval (double x, double y) const {
}
std::sort (std::begin (distances), std::end (distances));
CHECK_SOFT (distances[0] >= 0);
CHECK_SOFT (bounds ().contains (distances[0]));
return distances[0];
}