pub fn match_quality_two_teams(
    team_one: &[TrueSkillRating],
    team_two: &[TrueSkillRating],
    config: &TrueSkillConfig
) -> f64
Expand description

Gets the quality of the match, which is equal to the probability that the match will end in a draw. The higher the Value, the better the quality of the match.

Takes in two teams as a Slice of TrueSkillRatings and returns the probability of a draw occurring as an f64 between 1.0 and 0.0.

Similar to match_quality.

Examples

use skillratings::trueskill::{match_quality_two_teams, TrueSkillConfig, TrueSkillRating};

let player_one = TrueSkillRating {
    rating: 20.0,
    uncertainty: 8.0,
};
let player_two = TrueSkillRating {
    rating: 25.0,
    uncertainty: 6.0,
};

let player_three = TrueSkillRating {
    rating: 35.0,
    uncertainty: 7.0,
};
let player_four = TrueSkillRating {
    rating: 40.0,
    uncertainty: 5.0,
};

let quality = match_quality_two_teams(
    &vec![player_one, player_two],
    &vec![player_three, player_four],
    &TrueSkillConfig::new(),
);

// There is a 8.4% chance of a draw occurring.
assert!((quality - 0.084_108_145_418_343_24).abs() < f64::EPSILON);