JMDash Math

The JMDash Math library is basically JM-'s own version of C++'s <cmath>, and can be included in a JM- Project using: #incd .jmath

If something isn't clear about the syntax shown below, we recommend you to check out the examples category

Syntax & Examples

Here's a list of every function included in the .jmath library;

// mth.sqrt{} Stands for 'Math.SquareRoot'
// Used to calculate and store the square root of a variable
// Syntax (spaced): mth.sqrt{ << <outputVariable> << <inputVariable> };
#incd .jmath
int outputInt; int inputInt;
mth.sqrt{<< outputInt << inputInt};
// mth.log{} Stands for 'Math.Logarithm'
// Used to calculate and store the natural logarithm of a variable
// Syntax (spaced): mth.log{ << <outputVariable> << <inputVariable> };
#incd .jmath
int outputInt; int inputInt;
mth.log{<< outputInt << inputInt};
// mth.pwr{} Stands for 'Math.Power'
// Used to calculate and store the power of a variable based on another variable
// Syntax (spaced): mth.pwr{ << <outputVar> << <secInputVar> << <firInputVar>};
#incd .jmath
int outputVar; int firInputVar; int secInputVar;
mth.pwr{<< outputVar << secInputVar << firInputVar};
// mth.absl{} Stands for 'Math.Absolute'
// Used to calculate and store the absolute value of a variable
// Syntax (spaced): mth.absl{ << <outputVariable> << <inputVariable> };
#incd .jmath
int outputInt; int inputInt;
mth.absl{<< outputInt << inputInt};
// mth.fabs{} Stands for 'Math.FloatAbsolute'
// Used to calculate and store the absolute value of a float variable
// Syntax (spaced): mth.fabs{ << <outputVariable> << <inputVariable> };
#incd .jmath
dbl outputFloat; dbl inputFloat;
mth.fabs{<< outputFloat << inputFloat};
// mth.nan{} Stands for 'Math.NotANumber'
// Used to calculate and store a NaN value into a variable
// Syntax (spaced): mth.nan{ >> <outputInteger> };
#incd .jmath
int nanValue;
mth.nan{>> nanValue};

Last updated

Was this helpful?