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;
|
operator = null;
|
||||||
prevExpression = null;
|
prevExpression = null;
|
||||||
currExpression = "";
|
currExpression = "";
|
||||||
|
angleMode = 'deg';
|
||||||
|
scientificOperators.angleMode.val = angleMode;
|
||||||
} else {
|
} else {
|
||||||
specials.R.val = 'AC';
|
specials.R.val = 'AC';
|
||||||
drawKey('R', specials.R, true);
|
drawKey('R', specials.R, true);
|
||||||
@@ -388,7 +390,7 @@ function buttonPress(val) {
|
|||||||
displayOutput(results);
|
displayOutput(results);
|
||||||
prevExpression = "sqrt(" + prevExpression + ")";
|
prevExpression = "sqrt(" + prevExpression + ")";
|
||||||
} else if (currNumber != null) {
|
} else if (currNumber != null) {
|
||||||
currNumber = Math.sqrt(currNumber);
|
currNumber = Math.sqrt(parseFloat(currNumber));
|
||||||
displayOutput(currNumber);
|
displayOutput(currNumber);
|
||||||
currExpression = "sqrt(" + currExpression + ")";
|
currExpression = "sqrt(" + currExpression + ")";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user