MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin / calculateRate

Function calculateRate

plugin/chess/elo.go:21–27  ·  view source on GitHub ↗
(rate int, score float64, exception float64, k int)

Source from the content-addressed store, hash-verified

19}
20
21func calculateRate(rate int, score float64, exception float64, k int) int {
22 newRate := int(math.Round(float64(rate) + float64(k)*(score-exception)))
23 if newRate < 1 {
24 newRate = 1
25 }
26 return newRate
27}
28
29func getKFactor(rateA, rateB int) int {
30 if rateA > 2400 && rateB > 2400 {

Callers 1

calculateNewRateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected