fixed most obvious stuff #1

Merged
Lunya-sh merged 7 commits from Timerix/Evil_Calculator:timerix-is-timerixing-again into main 2026-01-12 14:54:51 +00:00
Showing only changes of commit 6d7b57c9f9 - Show all commits

View File

@@ -2,6 +2,7 @@
{
class EquationManager
{
private static readonly HashSet<string> _operators = new() { "+", "-", "*", "/", "^", "√" };
private ReverseNotationSolver reverseNotationSolver = new();
List<Token> equation = new();
@@ -173,11 +174,11 @@
outerOperandLabel.Text = currentOperand == "" ? "0" : currentOperand;
}
}
private bool IsOperator()
{
if (equation.Count == 0) return false;
return new[] { "+", "-", "*", "/", "^", "√" }.Contains(equation.Last().value);
return _operators.Contains(equation.Last().value);
}
private bool IsOpen()