Created
December 18, 2017 15:23
-
-
Save gabriel-dehan/daa077f26aebe36f8b9dd889010f008b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compute = (allocation, price, force_price: false) -> | |
if force_price | |
Math.max(Math.max(force_price, MINIMUM_QUOTE_ORDER_AMOUNT/price), MINIMUM_BASE_ORDER_AMOUNT) | |
else | |
Math.max(Math.max(allocation/price, MINIMUM_QUOTE_ORDER_AMOUNT/price), MINIMUM_BASE_ORDER_AMOUNT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment