getExtremumAlongDim method
Implementation
double getExtremumAlongDim(
{List<Vector3>? points, int dim = 0, int key = 0}) {
points ??= getPointsDefiningBoundary();
var values = [for (var point in points) point.getComponent(dim)];
if (key < 0) {
return values.reduce(min);
} else if (key == 0) {
var minVal = values.reduce(min);
var maxVal = values.reduce(max);
return (minVal + maxVal) / 2;
} else {
return values.reduce(max);
}
}