21 "Invalid symbol for stake");
24 "Odds for bet 1 ans bet 2 must make 1 in summ of it's probability");
28 auto r1 = bet1_stake * bet1_odds;
29 auto r2 = bet2_stake * bet2_odds;
31 auto p1 = r1 - bet1_stake;
32 auto p2 = r2 - bet2_stake;
37 result.bet2_matched = bet2_stake;
41 result.bet1_matched = bet1_stake;
46 result.bet1_matched = bet1_stake;
47 result.bet2_matched = bet2_stake;
odds_fraction_type inverted() const
asset calculate_gain(const asset &bet_stake, const odds &odds)
matched_stake_type calculate_matched_stake(const asset &bet1_stake, const asset &bet2_stake, const odds &bet1_odds, const odds &bet2_odds)
utils::fraction< odds_value_type, odds_value_type > odds_fraction_type
asset_symbol_type symbol() const