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
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 8f065abb81 - Show all commits

View File

@@ -144,7 +144,7 @@
{
if (currentOperand != "") equation.Add(new Token(Token.TokenType.Operand, currentOperand));
buttonEquals.Text = "#";
currentOperand = ReverseNotationSolver.Solve(equation);
currentOperand = ReversePolishNotationSolver.Solve(equation);
UpdateLabels();
}
}

View File

@@ -1,8 +1,8 @@
namespace Lunar.Evil_Calculator
{
internal static class ReverseNotationSolver
internal static class ReversePolishNotationSolver
{
private static List<Token> ToReverseNotation(List<Token> equation)
private static List<Token> ToReversePolishNotation(List<Token> equation)
{
List<Token> reversedEquation = new List<Token>();
Stack<Token> operators = new Stack<Token>();
@@ -47,7 +47,7 @@
public static string Solve(List<Token> originalEquation)
{
List<Token> reversedEquation = ToReverseNotation(originalEquation);
List<Token> reversedEquation = ToReversePolishNotation(originalEquation);
Stack<Token> stack = new Stack<Token>();
foreach (Token token in reversedEquation)
{