getMaxMinute function
Get the maximum minute from interval
Implementation
double getMaxMinute(double? maxMinute, MinuteInterval? interval) {
if (maxMinute == 59) {
return 59;
}
int step = getIntFromMinuteIntervalEnum(interval);
double max = 60;
double i = 1;
while (max > maxMinute!) {
double val = 60 - (i * step);
if (val <= maxMinute) {
max = val;
}
i++;
}
return max;
}