- return minmax (ax, l, r, d, 0, 0);
-}
+ Axis bx = other_axis (ax);
+
+ // The curve could hit its bounding box limit along BX at:
+ // points where the curve is parallel to AX,
+ Offset vec (0.0, 0.0);
+ vec[ax] = 1.0;
+ vector<Real> sols (solve_derivative (vec));
+ // or endpoints of the curve,
+ sols.push_back (0.999);
+ sols.push_back (0.001);
+ // (using points just inside the ends, so that an endpoint is evaulated
+ // if it falls within rounding error of L or R and the curve lies inside)