diff --git a/lib/.comparisonView.js.swp b/lib/.comparisonView.js.swp new file mode 100644 index 0000000..6f77f0c Binary files /dev/null and b/lib/.comparisonView.js.swp differ diff --git a/lib/comparisonView.js b/lib/comparisonView.js index d0fda06..b721909 100644 --- a/lib/comparisonView.js +++ b/lib/comparisonView.js @@ -319,9 +319,15 @@ export default function ComparisonView({ listOfElementsForView }) { }) => { if (!dontPushSubmitButtonAnyMore) { if (inputValue < 1 && inputValue > 0) { - inputValue = 1 / inputValue; + let inverse = 1 / inputValue; + if (squiggleString == inputValue) { + inputValue = inverse; + squiggleString = inverse; + } else { + inputValue = inverse; + squiggleString = `(${squiggleString})^(-1)`; + } [element1, element2] = [element2, element1]; - squiggleString = `(${squiggleString})^(-1)`; } console.log(`posList@nextStepInput:`); console.log(posList); @@ -470,7 +476,7 @@ export default function ComparisonView({ listOfElementsForView }) { {/* Results section */}