Math Functions
Built-in math functions

Method PrototypeDescription
Abs( value As Double ) As Doublecompute the absolute (i.e. unsigned) value of any number
ACos( value As Double ) As Doublecompute the arccosine of a number from -1 to 1
ASin( value As Double ) As Doublecompute the arcsine of a number from -1 to 1
ATan( value As Double ) As Doublecompute the arctangent of any number
ATan2( y As Double, x As Double ) As Doublecompute the angle (in radians) between the X axis to the given point (x,y)
Ceil( value As Double ) As Doublefind the closest integer greater than or equal to the given value
Cos( value As Double ) As Doublecompute the cosine of an angle
Exp( power As Double ) As Doublecompute the exponential function, i.e. e raised to the given power
Floor( value As Double ) As Doublefind the closest integer less than or equal to the given value
Log( value As Double ) As Doublecompute the natural logarithm of a positive number
Max( n1 As Double, ParamArray others As Double ) As Doublefind the greatest of two or more numbers
Min( n1 As Double, ParamArray others As Double ) As Doublefind the least of two or more numbers
Pow( base As Double, exponent As Double ) As Doubleequivalent to base ^ exponent
Rnd As Doublereturn a uniformly distributed pseudorandom number from 0 to 1 (see also Random)
Round( value As Double ) As Doubleround the given number to the nearest integer
Sin( value As Double ) As Doublecompute the sine of an angle
Sqrt( value As Double ) As Doublecompute the square root of a nonnegative number
Tan( value As Double ) As Doublecompute the tangent of an angle


These are the basic math functions built into Yuma. Trigonometric functions all take or return angles in radians, not degrees.

Invalid arguments (such as Log(-1), for example) will result in error values, which if passed through Str display as something like "-NAN(000)".