Skip to content

Commit

Permalink
Setting Nyano precision to 0 (no decimals) in rai pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
qwahzi authored Nov 6, 2021
1 parent a942ddc commit 6f20154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/pipes/rai.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export class RaiPipe implements PipeTransform {
if (hasRawValue) {
// New more precise toFixed function, but bugs on huge raw numbers
const newVal = value / this.mrai < 0.000001 ? 0 : value / this.mrai;
return `${this.toFixed(newVal, this.precision)}${!hideText ? ' NYANO' : ''}`;
return `${this.toFixed(newVal, 0)}${!hideText ? ' NYANO' : ''}`;
} else {
return `${(value / this.mrai).toFixed(6)}${!hideText ? ' NYANO' : ''}`;
return `${(value / this.mrai).toFixed(0)}${!hideText ? ' NYANO' : ''}`;
}
case 'knano': return `${(value / this.krai).toFixed(3)}${!hideText ? ' knano' : ''}`;
case 'nano': return `${(value / this.rai).toFixed(0)}${!hideText ? ' nano' : ''}`;
Expand Down

0 comments on commit 6f20154

Please sign in to comment.