offset method

double offset(
  1. int month
)

月份的起始偏移

Implementation

double offset(int month) {
  if (months.isEmpty) return 0;
  double ret = 0;
  for (int i = months.first.month; i < month; i++) {
    ret += months[i - months.first.month].height;
  }
  return ret;
}