calculateRatio method
Implementation
double calculateRatio(double ratio, double dif, int number) {
switch (number) {
case 1:
return (ratio - (dif / 5 * 4)) * _totalSize;
case 2:
return (ratio - (dif / 5 * 3)) * _totalSize;
case 3:
return (ratio - (dif / 5 * 2)) * _totalSize;
case 4:
return (ratio - (dif / 5)) * _totalSize;
case 6:
return (ratio + (dif / 5)) * _totalSize;
case 7:
return (ratio + (dif / 5 * 2)) * _totalSize;
case 8:
return (ratio + (dif / 5 * 3)) * _totalSize;
case 9:
return (ratio + (dif / 5 * 4)) * _totalSize;
default:
return ratio;
}
}