getElevation static method

double getElevation(
  1. double? offset,
  2. double maxElevation
)

Implementation

static double getElevation(double? offset, double maxElevation) {
  if (offset != null) {
    double elevation =
        (offset * 1) > maxElevation ? maxElevation : (offset * 1);
    if (elevation >= 0) {
      return elevation;
    }
  }
  return 0.0;
}