fix: Reset angle mode on AC and parse float for square root
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -364,6 +364,8 @@ function buttonPress(val) {
|
||||
operator = null;
|
||||
prevExpression = null;
|
||||
currExpression = "";
|
||||
angleMode = 'deg';
|
||||
scientificOperators.angleMode.val = angleMode;
|
||||
} else {
|
||||
specials.R.val = 'AC';
|
||||
drawKey('R', specials.R, true);
|
||||
@@ -388,7 +390,7 @@ function buttonPress(val) {
|
||||
displayOutput(results);
|
||||
prevExpression = "sqrt(" + prevExpression + ")";
|
||||
} else if (currNumber != null) {
|
||||
currNumber = Math.sqrt(currNumber);
|
||||
currNumber = Math.sqrt(parseFloat(currNumber));
|
||||
displayOutput(currNumber);
|
||||
currExpression = "sqrt(" + currExpression + ")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user