double RD when showing ratings
This commit is contained in:
parent
ad14934068
commit
f25ac86eec
|
@ -2,7 +2,7 @@
|
|||
<div class="title">
|
||||
<span class="user_link @isOnline(u.id).fold("online", "offline")">
|
||||
<strong title="Glicko rating">@u.rating</strong>
|
||||
<small title="Glicko rating deviation">±@u.perfs.global.glicko.intDeviation</small>
|
||||
<small title="Glicko rating deviation">±@u.perfs.global.glicko.intDeviationDoubled</small>
|
||||
@showProgress(u.progress)
|
||||
@u.count.game.localize @trans.games()
|
||||
</span>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
case ((name, perf), i) => {
|
||||
<div class="sub_ratings @{ (i == 0 || i == 2 || i == 5) ?? "sep" }" title="@perfTitle(name)">
|
||||
<h3>@name.toUpperCase</h3>
|
||||
<strong title="Glicko rating">@perf.glicko.intRating</strong><small title="Glicko rating deviation"> ±@perf.glicko.intDeviation</small> / <span title="Number of games played">@perf.nb.localize @trans.games()</span>
|
||||
<strong title="Glicko rating">@perf.glicko.intRating</strong><small title="Glicko rating deviation"> ±@perf.glicko.intDeviationDoubled</small> / <span title="Number of games played">@perf.nb.localize @trans.games()</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ evenMoreJs = evenMoreJs) {
|
|||
}
|
||||
<div class="icon status @{isOnline(u.id).??("connected")}"></div>
|
||||
<h1 class="lichess_title">@u.username</h1>
|
||||
<span class="rating">RATING <strong title="Glicko rating">@u.rating</strong><small title="Glicko rating deviation"> ±@u.perfs.global.glicko.intDeviation</small></span>
|
||||
<span class="rating">RATING <strong title="Glicko rating">@u.rating</strong><small title="Glicko rating deviation"> ±@u.perfs.global.glicko.intDeviationDoubled</small></span>
|
||||
@showProgress(u.progress)
|
||||
@info.rank.map { r =>
|
||||
<span class="rank" title="@trans.rank()">RANK <strong>@r._1.localize</strong> / @{r._2/1000}k</span>
|
||||
|
|
|
@ -11,6 +11,7 @@ case class Glicko(
|
|||
|
||||
def intRating = rating.toInt
|
||||
def intDeviation = deviation.toInt
|
||||
def intDeviationDoubled = (deviation * 2).toInt
|
||||
|
||||
def interval = (rating - deviation * 2).toInt -> (rating + deviation * 2).toInt
|
||||
|
||||
|
@ -22,8 +23,8 @@ case object Glicko {
|
|||
val default = Glicko(1500d, 350d, 0.06d)
|
||||
|
||||
def range(rating: Double, deviation: Double) = (
|
||||
rating - deviation,
|
||||
rating + deviation
|
||||
rating - (deviation * 2),
|
||||
rating + (deviation * 2)
|
||||
)
|
||||
|
||||
private def GlickoBSONHandler = new BSON[Glicko] {
|
||||
|
|
Loading…
Reference in a new issue