Added common IsEnabled function to output a string.

This commit is contained in:
Adrian Gallagher
2015-03-22 15:45:46 +11:00
parent 54014d8059
commit cfd5c8d038

View File

@@ -103,6 +103,14 @@ func RoundFloat(x float64, prec int) float64 {
return rounder / pow
}
func IsEnabled(isEnabled bool) (string) {
if isEnabled {
return "Enabled"
} else {
return "Disabled"
}
}
func CalculateAmountWithFee(amount, fee float64) (float64) {
return amount + CalculateFee(amount, fee)
}