Skip to content

Instantly share code, notes, and snippets.

@kayr
Created January 14, 2020 13:42
Show Gist options
  • Save kayr/e92a8f488d04180359c9b24f941fc800 to your computer and use it in GitHub Desktop.
Save kayr/e92a8f488d04180359c9b24f941fc800 to your computer and use it in GitHub Desktop.
def bal = 994000.0
def wc = 1.0
def mb = -5000
def maxW = (bal - mb) / ((wc / 100) + 1)
println("MaxWithDraw [$maxW]" +
" ChargeAmount[${(wc / 100 * maxW)}]" +
" BalaceMinusWithdraw [${bal - maxW - wc / 100 * maxW}]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment