Change rating percentile to a decimal place precision.
parent
b5fa431230
commit
17eef55573
|
@ -20,7 +20,7 @@ final class JsonView(getLightUser: String => Option[LightUser]) {
|
|||
"rank" -> rank,
|
||||
"percentile" -> ratingDistribution.map { distrib =>
|
||||
lila.user.Stat.percentile(distrib, user.perfs(stat.perfType).intRating) match {
|
||||
case (under, sum) => Math.round(under * 100.0 / sum)
|
||||
case (under, sum) => Math.round(under * 1000.0 / sum) / 10.0
|
||||
}
|
||||
},
|
||||
"stat" -> stat.copy(playStreak = stat.playStreak.checkCurrent))
|
||||
|
|
|
@ -40,7 +40,7 @@ module.exports = {
|
|||
return util.fMap(d.stat.playStreak.time, function(s) {
|
||||
return [
|
||||
m('h2', m('span', {
|
||||
title: 'less than one hour between games'
|
||||
title: lessThan
|
||||
}, 'Max time spent playing')),
|
||||
streaks(s, util.formatSeconds)
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue