Skip to content

Commit

Permalink
handle rates > 0 better
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Jan 30, 2024
1 parent d8e9922 commit de11757
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/webserver/site/src/js/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export default class Doc {
const convRate = encRate * r / RateEncodingFactor
const rateStepDigits = log10RateEncodingFactor - Math.floor(Math.log10(rateStepEnc)) -
Math.floor(Math.log10(bui.conventional.conversionFactor) - Math.log10(qui.conventional.conversionFactor))
if (rateStepDigits <= 0) return intFormatter.format(convRate)
return fullPrecisionFormatter(rateStepDigits).format(convRate)
}

Expand Down

0 comments on commit de11757

Please sign in to comment.