Add SyMAT Java functions to autocomplete and scripts
parent
ddaecb8594
commit
5a9cbc9af6
@ -1,3 +1,3 @@
|
||||
String formula = ask("Enter formula:");
|
||||
plot(formula);
|
||||
plotname("Cool graph!");
|
||||
String formula = symat.ask("Enter formula:");
|
||||
symat.plot(formula);
|
||||
symat.plotname("Cool graph!");
|
@ -1,6 +1,9 @@
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
print("Hello world");
|
||||
String message = "Hello World!";
|
||||
int x = 5;
|
||||
print(message);
|
||||
symat.notify(message + " X is " + x + ".");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,162 +1,6 @@
|
||||
void notify(String msg) {
|
||||
SyMAT_Functions.notify(msg);
|
||||
}
|
||||
Object ask(String msg) {
|
||||
return SyMAT_Functions.ask(msg);
|
||||
}
|
||||
Object factorial(int n) {
|
||||
return SyMAT_Functions.factorial(n);
|
||||
}
|
||||
Object diff(String fun,String var) {
|
||||
return SyMAT_Functions.diff(fun,var);
|
||||
}
|
||||
Object integrate(String fun,String var) {
|
||||
return SyMAT_Functions.integrate(fun,var);
|
||||
}
|
||||
Object rad(double num) {
|
||||
return SyMAT_Functions.rad(num);
|
||||
}
|
||||
Object deg(double num) {
|
||||
return SyMAT_Functions.deg(num);
|
||||
}
|
||||
Object subs(String fun,String var) {
|
||||
return SyMAT_Functions.subs(fun,var);
|
||||
}
|
||||
void plot(String fun) {
|
||||
SyMAT_Functions.plot(fun);
|
||||
}
|
||||
void plot() {
|
||||
SyMAT_Functions.plot();
|
||||
}
|
||||
void plotname(String fun) {
|
||||
SyMAT_Functions.plotname(fun);
|
||||
}
|
||||
Object plotname() {
|
||||
return SyMAT_Functions.plotname();
|
||||
}
|
||||
void xlim(int min, int max) {
|
||||
SyMAT_Functions.xlim(min,max);
|
||||
}
|
||||
void plotclr() {
|
||||
SyMAT_Functions.plotclr();
|
||||
}
|
||||
void drawdot(int x, int y) {
|
||||
SyMAT_Functions.drawdot(x, y);
|
||||
}
|
||||
Object simplify(String expr) {
|
||||
return SyMAT_Functions.simplify(expr);
|
||||
}
|
||||
Object vpa(String expr) {
|
||||
return SyMAT_Functions.vpa(expr);
|
||||
}
|
||||
Object readfile(String path) {
|
||||
return SyMAT_Functions.readfile(path);
|
||||
}
|
||||
void savefile(String data,String path) {
|
||||
SyMAT_Functions.savefile(data,path);
|
||||
}
|
||||
Object mtimes(double[][] a, double[][] b) {
|
||||
return SyMAT_Functions.mtimes(a,b);
|
||||
}
|
||||
Object mpower(double[][] a, int b) {
|
||||
return SyMAT_Functions.mpower(a,b);
|
||||
}
|
||||
Object add(double a...) {
|
||||
return SyMAT_Functions.add(a);
|
||||
}
|
||||
Object subtract(double a...) {
|
||||
return SyMAT_Functions.subtract(a);
|
||||
}
|
||||
Object times(double a...) {
|
||||
return SyMAT_Functions.times(a);
|
||||
}
|
||||
Object divide(double a...) {
|
||||
return SyMAT_Functions.divide(a);
|
||||
}
|
||||
Object mod(double a...) {
|
||||
return SyMAT_Functions.mod(a);
|
||||
}
|
||||
Object rand(int min, int max) {
|
||||
return SyMAT_Functions.rand(min,max);
|
||||
}
|
||||
Object rand(int min) {
|
||||
return SyMAT_Functions.rand(min,1);
|
||||
}
|
||||
Object rand() {
|
||||
return SyMAT_Functions.rand(0,1);
|
||||
}
|
||||
Object randb() {
|
||||
return SyMAT_Functions.randb();
|
||||
}
|
||||
void sleep(int x) {
|
||||
SyMAT_Functions.sleep(x);
|
||||
}
|
||||
void pause(int x) {
|
||||
SyMAT_Functions.pause(x);
|
||||
}
|
||||
Object perms(double a...) {
|
||||
return SyMAT_Functions.perms(a);
|
||||
}
|
||||
Object md5sum(String a) {
|
||||
return SyMAT_Functions.md5sum(a);
|
||||
}
|
||||
Object save(String a, String b) {
|
||||
return SyMAT_Functions.save(a,b);
|
||||
}
|
||||
Object load(String a) {
|
||||
return SyMAT_Functions.load(a);
|
||||
}
|
||||
Object powermod(String a,String b,String m) {
|
||||
return SyMAT_Functions.powermod(a,b,m);
|
||||
}
|
||||
Object powermod(double a,double b,double m) {
|
||||
return SyMAT_Functions.powermod(a,b,m);
|
||||
}
|
||||
Object gcd(long a,long b) {
|
||||
return SyMAT_Functions.gcd(a,b);
|
||||
}
|
||||
Object solve(String a, String b, int c) {
|
||||
return SyMAT_Functions.solve(a,b,c);
|
||||
}
|
||||
Object solve(String a) {
|
||||
return SyMAT_Functions.solve(a,"x",0);
|
||||
}
|
||||
Object printa(Object a) {
|
||||
return SyMAT_Functions.printa(a);
|
||||
}
|
||||
Object sec(double a) {
|
||||
return SyMAT_Functions.sec(a);
|
||||
}
|
||||
Object csc(double a) {
|
||||
return SyMAT_Functions.csc(a);
|
||||
}
|
||||
Object cot(double a) {
|
||||
return SyMAT_Functions.cot(a);
|
||||
}
|
||||
Object asec(double a) {
|
||||
return SyMAT_Functions.asec(a);
|
||||
}
|
||||
Object acsc(double a) {
|
||||
return SyMAT_Functions.acsc(a);
|
||||
}
|
||||
Object acot(double a) {
|
||||
return SyMAT_Functions.acot(a);
|
||||
}
|
||||
Object sech(double a) {
|
||||
return SyMAT_Functions.sech(a);
|
||||
}
|
||||
Object csch(double a) {
|
||||
return SyMAT_Functions.csch(a);
|
||||
}
|
||||
Object coth(double a) {
|
||||
return SyMAT_Functions.coth(a);
|
||||
}
|
||||
Object filedialog() {
|
||||
return SyMAT_Functions.filedialog();
|
||||
}
|
||||
Object textbox() {
|
||||
return SyMAT_Functions.textbox();
|
||||
}
|
||||
Object browser() {
|
||||
return SyMAT_Functions.browser();
|
||||
}
|
||||
import net.apocalypselabs.symat.Functions;
|
||||
Functions symat = new Functions();
|
||||
public static final double E = java.lang.Math.E;
|
||||
public static final double PI = java.lang.Math.PI;
|
||||
public static final double SQRT1_2 = java.lang.Math.sqrt(0.5);
|
||||
public static final double SQRT2 = java.lang.Math.sqrt(2);
|
@ -1,8 +1,4 @@
|
||||
E
|
||||
PI
|
||||
LN2
|
||||
LN10
|
||||
LOG2E
|
||||
LOG10E
|
||||
SQRT1_2
|
||||
SQRT2
|
Loading…
Reference in New Issue