Arreglado horrible error con el parseo matematico
This commit is contained in:
@@ -82,7 +82,9 @@ public class NumberFormatedTextField extends JTextField {
|
||||
*/
|
||||
private void readValue(){
|
||||
String currentText = this.getText();
|
||||
Expression expression = new Expression(currentText);
|
||||
String stripedDots = currentText.replace(".", "");
|
||||
Expression expression = new Expression(stripedDots);
|
||||
|
||||
if(expression.checkSyntax()){
|
||||
this.value = (int) Math.floor(expression.calculate());
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user