checkLimitPercentage function
Implementation
double checkLimitPercentage(
double minAmount,
double maxAmount,
) {
// return percentage of minAmount
var percentage = (minAmount / maxAmount) * 100;
if (percentage <= 0) {
return 0.0;
} else if (percentage >= 100) {
return 100.0;
} else {
return percentage/100;
}
// return (minAmount / maxAmount) * 100;
}