Skip to content

Commit

Permalink
chore: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Razinsky committed Jul 3, 2024
1 parent fbcd169 commit 2c9a87e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/checkAndEvaluateMath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ function parseAndReduce(expr: string, fractionDigits = defaultFractionDigits): s
}

// the outer Number() gets rid of insignificant trailing zeros of decimal numbers
const reducedTo3Fixed = Number(Number.parseFloat(`${result}`).toFixed(fractionDigits));
result = resultUnit ? `${reducedTo3Fixed}${resultUnit}` : reducedTo3Fixed;
const reducedToFixed = Number(Number.parseFloat(`${result}`).toFixed(fractionDigits));
result = resultUnit ? `${reducedToFixed}${resultUnit}` : reducedToFixed;
return result;
}

Expand Down

0 comments on commit 2c9a87e

Please sign in to comment.