-
Notifications
You must be signed in to change notification settings - Fork 95
Standard Functions
pieterderycke edited this page Dec 31, 2012
·
13 revisions
The following mathematical functions are out of the box supported by Jace.NET:
- sin: Sine
- cos: Cosine
- asin: Arcsine
- acos: Arccosine
- tan: Tangent
- cot: Cotangent
- atan: Arctangent
- acot: Arccotangent
- loge: Natural logarithm
- log10: Common logarithm
- logn: Logarithm
- sqrt: Square root
Calculating the sine of 90:
CalculationEngine engine = new CalculationEngine();
double result = engine.Calculate("sin(90)");
The logarithm of var1 to base var2:
Dictionary<string, double> variables = new Dictionary<string, double>();
variables.Add("var1", 2.5);
variables.Add("var2", 3.4);
CalculationEngine engine = new CalculationEngine();
double result = engine.Calculate("logn(var1, var2)", variables);