mirror of
https://github.com/smogon/pokemon-showdown-loginserver.git
synced 2026-09-08 18:25:11 -05:00
Add missing truncation
This commit is contained in:
@@ -46,11 +46,11 @@ export class Ladder {
|
||||
this.rpoffset = 9 * 60 * 60;
|
||||
}
|
||||
getRP() {
|
||||
const rpnum = ((time() - this.rpoffset) / this.rplen) + 1;
|
||||
const rpnum = Math.trunc((time() - this.rpoffset) / this.rplen) + 1;
|
||||
return rpnum * this.rplen + this.rpoffset;
|
||||
}
|
||||
nextRP(rp: number) {
|
||||
const rpnum = (rp / this.rplen);
|
||||
const rpnum = Math.trunc(rp / this.rplen);
|
||||
return (rpnum + 1) * this.rplen + this.rpoffset;
|
||||
}
|
||||
clearRating(name: string) {
|
||||
|
||||
Reference in New Issue
Block a user