lengthOverDim method
Implementation
double lengthOverDim(int dim) {
var pts = getAllPoints();
if (pts.isEmpty) {
return 1;
}
var components = pts.map((pt) => pt.getComponent(dim));
var minPos = components.reduce(min);
var maxPos = components.reduce(max);
return maxPos - minPos;
}