Mathematical functions library.
| type and name | description | comments |
pifloating point |
pi ~ 3.14 | |
twopifloating point |
2*pi ~ 6.28 | |
pi2floating point |
pi/2 ~ 1.57 | |
pi4floating point |
pi/4 ~ 0.78 | |
rnd01floating point |
random number [0..1) | |
seedinteger |
random seed | Random number generator seed. This value cannot be read, it is write-only property.
Note: Math.seed influences all future random activity in the simulator, not only Math.rnd01 results. |
timefloating point |
current time | Number of seconds since the Epoch (00:00:00 UTC/GMT, January 1, 1970) |
sinfunction |
sinus | |
cosfunction |
cosinus | |
expfunction |
exponent | |
logfunction |
logarithm; base = e | |
sqrtfunction |
square root | |
sigmoidfunction |
sigmoid function = 2/(1+exp(-x))-1 | |