-
-
Save BitChop/ec47628eb7e7b9460ad75da7d6654f41 to your computer and use it in GitHub Desktop.
A few martingale oriented inverse utility functions.
This file contains 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
const getBaseBetFromCurrent = (wager, multi, streak) => (wager / (multi ^ streak)); | |
const getBetSizeForStreak = (base, multi, streak) => (base * (multi ^ streak)); | |
const getStreakSizeFromBet = (base, wager, multi) => (Math.log(wager / base) / Math.log(multi)); | |
const getPrevBetFromLastBet = (wager, multi) => (wager / multi); | |
const getBetMultiFromPrevBet = (wager, prev) => (wager / prev); | |
const getBetMultiForPayout = (payout) => (payout / (payout - 1)); | |
const getPayoutFromBetMulti = (multi) => (multi / (multi - 1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment