Math¶
-
mAbs
(%n)¶ Returns the absolute value (the distance from 0 on the number line) of %n.
==> mAbs(-5); 5 ==> mAbs(5); 5
-
mAcos
(%n)¶ A Trigonometrical function that returns the arc-cosine of %n, in radians.
-
mAsin
(%n)¶ A Trigonometrical function that returns the arc-sine of %n, in radians.
-
mAtan
(%n)¶ A Trigonometrical function that returns the arc-tangent of %n, in radians.
-
mCos
(%n)¶ A Trigonometrical function that returns the cosine of %n.
-
mSin
(%n)¶ A Trigonometrical function that returns the sine of %n.
-
mTan
(%n)¶ A Trigonometrical function that returns the tangent of %n.
-
mCeil
(%n)¶ Rounds %n up and returns the result.
-
mFloor
(%n)¶ Rounds %n down and returns the result.
-
mClamp
(%n, %min, %max)¶ Clamps %n between %min and %max. If %n is smaller than %min it returns %min, if %n is larger than %max it returns %max, otherwise it returns %n.
==> mClamp(5,1,10); 5 ==> mClamp(-2,1,10); 1 ==> mClamp(23,1,10); 10
-
mClampF
(%n, %min, %max)¶ Clamps %n between %min and %max, supporting floating (decimal) point numbers. If %n is smaller than %min it returns %min, if %n is larger than %max it returns %max, otherwise it returns %n.
-
mDegToRad
(%n)¶ Converts %n from radians to degrees and returns the result.
-
mRadToDeg
(%n)¶ Converts %n from degrees to radians and returns the result.
-
mFloatLength
(%n, %length)¶ Returns the floating (decimal) point value of %n with only %length number of decimal places with the last decimal place rounded.
==> mFloatLength(3.14159265,4); 3.1416
-
mLog
(%n)¶ Returns the natural logarithm of %n.
-
mPow
(%n, %x)¶ Returns %n to the power of %x.
==> mPow(2,2); 4 ==> mPow(2,4); 16 ==> mPow(16, 1 / 2); 4
-
mSqrt
(%n)¶ Returns the square root of %n. This is the same as mPow(%n, 1 / 2);