Math class, available in: Global contextMathematical functions library.This class has 29 members:
sdleiF
float pi ROpi ~ 3.14
float pi2 ROpi/2 ~ 1.57
float pi4 ROpi/4 ~ 0.78
float rnd01 ROrandom number [0..1)
float rndGaussStd ROrandom number (normal distribution)
int seedrandom seedRandom number generator seed.
Note: Math.seed influences all further random activity in the simulator, not just the results of functions in this class.
Note #2: When read, the value behaves just like a regular variable that stores the previously assigned value. It does NOT reflect the internal random generator seed that changes every time a random number has been generated.
float time ROcurrent timeNumber of seconds since the Epoch (00:00:00 UTC/GMT, January 1, 1970)
float twopi RO2*pi ~ 6.28
snoitcnuF
function abs(float)returns floatabsolute value
function acos(float)returns floatarc cosinus
function asin(float)returns floatarc sinus
function atan(float)returns floatarc tangent
function atan2(float y, float x)returns floatarc tangent of y/x
function cos(float)returns floatcosinus
function exp(float)returns floatexponent
function log(float)returns floatlogarithm; base = e
function max(untyped, untyped)returns untypedmaximum
function min(untyped, untyped)returns untypedminimum
function pow(float a, float b)returns floatpower, a^b
function random(int num)returns intinteger random number0..num-1
function randomize()set random seedSet random seed for the random number generator.
function rndCustom(Vector)returns floatrandom numberthe parameter describes the desired random distribution, being a sum of uniform distributions, eg. rndCustom([-10,-1, -1,1, 1,10]) defines 3 uniform distribution intervals [-1,10) [-1,1), [1,10)
function rndGauss(float mean, float standard_deviation)returns floatrandom number (selectable std.dev.)rndGaussStd is rndGauss(0,1)
function rndUni(float begin, float end)returns floatrandom number (uniform distribution)[begin..end)
function sigmoid(float)returns floatsigmoid function = 2/(1+exp(-x))-1
function sign(float)returns intsign (-1, 0 or 1)
function sin(float)returns floatsinus
function sqrt(float)returns floatsquare root
function tan(float)returns floattangent
Global context