Constants for some fixed square root math.

This commit is contained in:
2024-02-15 10:12:45 +00:00
parent 5bebd9310d
commit f372d9a028
2 changed files with 16 additions and 14 deletions

View File

@ -18,6 +18,6 @@ final class DrawMargin
//
// margin = inversecdf((draw probability + 1)/2) * sqrt(n1+n2) * beta
// n1 and n2 are the number of players on each team
return GaussianDistribution::inverseCumulativeTo(.5 * ($drawProbability + 1), 0, 1) * sqrt(1 + 1) * $beta;
return GaussianDistribution::inverseCumulativeTo(.5 * ($drawProbability + 1), 0, 1) * M_SQRT2 * $beta;
}
}