fix for asin/acos
This commit is contained in:
parent
750e4e5503
commit
5d4c42a0e7
@ -36,6 +36,12 @@ public class Preprocessor {
|
|||||||
} else if (s.startsWith("atg", i)) {
|
} else if (s.startsWith("atg", i)) {
|
||||||
sb.append("atan");
|
sb.append("atan");
|
||||||
i += 2;
|
i += 2;
|
||||||
|
} else if (s.startsWith("acos", i)) {
|
||||||
|
sb.append("acos");
|
||||||
|
i += 3;
|
||||||
|
} else if (s.startsWith("asin", i)) {
|
||||||
|
sb.append("asin");
|
||||||
|
i += 3;
|
||||||
} else if (s.startsWith("e(", i)) {
|
} else if (s.startsWith("e(", i)) {
|
||||||
sb.append("exp(");
|
sb.append("exp(");
|
||||||
i += 1;
|
i += 1;
|
||||||
@ -65,9 +71,9 @@ public class Preprocessor {
|
|||||||
mathTypeBefore != MathEntityType.function &&
|
mathTypeBefore != MathEntityType.function &&
|
||||||
!MathEntityType.openGroupSymbols.contains(chBefore)) {
|
!MathEntityType.openGroupSymbols.contains(chBefore)) {
|
||||||
|
|
||||||
if (mathType == MathEntityType.constant ) {
|
if (mathType == MathEntityType.constant) {
|
||||||
sb.append("*");
|
sb.append("*");
|
||||||
} else if ( MathEntityType.openGroupSymbols.contains(ch) && mathTypeBefore != null ) {
|
} else if (MathEntityType.openGroupSymbols.contains(ch) && mathTypeBefore != null) {
|
||||||
sb.append("*");
|
sb.append("*");
|
||||||
} else if (mathType == MathEntityType.digit && mathTypeBefore != MathEntityType.digit && mathTypeBefore != MathEntityType.dot) {
|
} else if (mathType == MathEntityType.digit && mathTypeBefore != MathEntityType.digit && mathTypeBefore != MathEntityType.dot) {
|
||||||
sb.append("*");
|
sb.append("*");
|
||||||
|
Loading…
Reference in New Issue
Block a user