new interface implementation
This commit is contained in:
@@ -15,8 +15,12 @@ public class Preprocessor {
|
||||
sb.append('(');
|
||||
} else if (ch == ']' || ch == '}') {
|
||||
sb.append(')');
|
||||
} else if ( ch == ',' ) {
|
||||
} else if (ch == ',') {
|
||||
sb.append('.');
|
||||
} else if (ch == 'π') {
|
||||
sb.append("pi");
|
||||
} else if (ch == '√') {
|
||||
sb.append("sqrt");
|
||||
} else {
|
||||
sb.append(ch);
|
||||
}
|
||||
@@ -24,8 +28,8 @@ public class Preprocessor {
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String wrap (@NotNull JsclOperation operation, @NotNull String s) {
|
||||
return operation.name() + "(\"" + s + "\");";
|
||||
|
||||
public static String wrap(@NotNull JsclOperation operation, @NotNull String s) {
|
||||
return operation.name() + "(\"" + s + "\");";
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ public enum MathEntityType {
|
||||
|
||||
private static final List<Character> binaryOperations = Arrays.asList('-', '+', '*', '/', '^' );
|
||||
|
||||
private static final List<String> functions = Arrays.asList("sin", "asin", "cos", "acos", "tg", "atg", "exp", "log", "ln", "mod", "sqrt");
|
||||
private static final List<String> functions = Arrays.asList("sin", "asin", "cos", "acos", "tg", "atg", "exp", "log", "ln", "mod", "√");
|
||||
|
||||
private static final List<String> groupSymbols = Arrays.asList("[]", "()", "{}");
|
||||
|
||||
|
Reference in New Issue
Block a user