area method

double area()

Axis-wise area (product of side lengths). For dims=1 this is the 1-d extent.

Implementation

double area() {
  var a = 1.0;
  for (var i = 0; i < dims; i++) {
    a *= bounds[i + dims] - bounds[i];
  }
  return a;
}