From 2c9a87e42e4a48daff20ebe76a7a93ebdf1ec2d5 Mon Sep 17 00:00:00 2001 From: Simon Racine-Chevalier Date: Wed, 3 Jul 2024 13:19:02 -0600 Subject: [PATCH] chore: rename variable --- src/checkAndEvaluateMath.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/checkAndEvaluateMath.ts b/src/checkAndEvaluateMath.ts index fd70454..26048af 100644 --- a/src/checkAndEvaluateMath.ts +++ b/src/checkAndEvaluateMath.ts @@ -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; }