Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def calc_eth(eth_currency, target_eth, eth_asset, try_asset)
  2. x = 1
  3. loop do
  4. if (((x / eth_currency.to_f) + eth_asset) * target_eth.to_f) <= try_asset + x
  5. x = x + 1
  6. else
  7. break
  8. end
  9. end
  10. x
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement