Add missing truncation

This commit is contained in:
gigalh128
2023-07-24 20:25:44 -04:00
parent 1186bcfb4a
commit da34bdbee4

View File

@@ -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) {