report profit loss
This commit is contained in:
@@ -44,3 +44,13 @@ Map<String, int> getChairDistribution(int capacity) {
|
||||
return {'top': side, 'bottom': side, 'left': 1, 'right': 1};
|
||||
}
|
||||
}
|
||||
|
||||
double safeDouble(double value) {
|
||||
if (value.isNaN || value.isInfinite) return 0.0;
|
||||
return value;
|
||||
}
|
||||
|
||||
int safeRound(double value) {
|
||||
if (value.isNaN || value.isInfinite) return 0;
|
||||
return value.round();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user