getIntegral method

double getIntegral ()

Returns the integral of this shape if its was computed (see getValuesAt, otherwise throws.

Implementation

double getIntegral() {
  if (!integralCalculated) {
    throw "Integral not available.\nCall getValuesAt(..) first.";
  }
  return integral;
}