Mathematical Functions
In this document, mathematical functions are demonstrated with examples.
To view this example for all mathematical functions in the library, see (OpenBrIM Platform)
abs (Number)
The function returns the absolute value of the specified number. |
<O N="MF1" T="Group">
<P N="Num1" V="-5" />
<P N="AbsoluteValue" V="abs(Num1)" />
</O> |
Debug Trace |
acos (Number)
It is a function that returns the arccosine of a given number in radians. The angle is given in radians between 0 and PI. |
<O N="MF2" T="Group">
<P N="x" V="0.5" />
<P N="arccos" V="acos(x)" />
</O> |
Debug Trace |
asin (Number)
It is a function that returns the arcsine of a given number in radians. The angle is given in radians between 0 and PI. |
<O N="MF3" T="Group">
<P N="x" V="0.5" />
<P N="arcsin" V="asin(x)" />
</O> |
atan (Number)
It is a function that returns the arctangent of a given number in radians. The angle is given in radians between 0 and PI. |
atan2 (Number)
The function calculates the arctangent or inverse tangent of the given x and y coordinates. It determines the angle, in radians, between the x-axis and a line connecting the origin (0,0) to the specified x,y point. The resulting angle will be in the range of 0 to PI. |
ceil (Number)
The function rounds the specified number to the nearest integer that is greater than that number. |
cos (Angle)
This function calculates the cosine of a specified number in radians. The input value must be within the range of 0 and PI. |
exp (Number)
This function calculates the power of e (approximately equal to 2.7183) raised to the specified number. It returns the result of e^x, where x is the input number. |
floor (Number)
The function rounds the specified number down to the nearest integer. |
log (Number)
This function calculates the natural logarithm, with base "e" (approximately equal to 2.7183), of the specified number. It returns the result of the logarithm calculation. |
max (Number1, Number2, ..)
The function returns the maximum value among the specified numbers. It compares all of the input numbers and returns the largest one as the result. |
min (Number1, Number2, ..)
The function returns the minimum value among the specified numbers. It compares all of the input numbers and returns the lowest one as the result. |
pow (Number1, Number2)
This function calculates the result of raising the first specified number (number1) to the power of the second specified number (number2). The result will be number1number2. |
random ( )
The function returns a random decimal number between 0 and 1 inclusive. The result will be a pseudo-random value generated by the system. |
round (Number)
The function rounds the specified number to the nearest integer. |
sin (Angle)
This function calculates the sine of a specified number in radians. The input value must be within the range of 0 and PI. |
sqrt (Number)
The function calculates the square root of the specified number. It returns the result of the square root calculation. |
tan (Angle)
This function calculates the tangent of a specified number in radians. The input value must be within the range of 0 and PI. |