Skip to content

Commit

Permalink
feat(intg): solve for fraction of given entry
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Dec 23, 2022
1 parent 3d8f6db commit 755a64a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/CalculatorContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ function evaluateExpression(evaluationMethod: PossibleButtonValues) {
evaluationValue.value = percentageResult
break
}
case "1/x": {
const quotient = 1 / Number(entryValue.value)
evaluationValue.value = `1/(${entryValue.value})`
entryValue.value = String(quotient)
}
}
mustResetOnNextEntry.value = true
}
</script>

Expand Down

0 comments on commit 755a64a

Please sign in to comment.