The following are the mathematical functions you can use in COD scripts. In most cases, the syntax can be copied/pasted directly into a file and function properly. They should be edited for your particular use. This allows you to short cut your time by not having to experiment to figure out code syntax.

FunctionExampleReturn Value
absabs(-3, 4)3.4
acosacos(3, 4)41.4096221
asinasin(3, 4)48.5903779
atanatan(3, 4)36.8698976
coscos(45)0.7071068
expexp(2)10
loglog(100)2
numbernumber("5")
number("5.0")
number("5.5")
5
5
5.5
powpow(5, 2)
pow(2, 3)
25
8
roundround(5.49)
round(5.50)
round(5.449, 1)
round(5.450, 1)
5
6
5.4
5.5
rounddownrounddown(5.934)
rounddown(5.934, 1)
rounddown(5.934, 2)
5
5.9
5.93
rounduproundup(5.145)
roundup(5.145, 1)
roundup(5.145, 2)
6
5.2
5.15
signsign(-3.4)
sign(3.4)
sign(0.000001)
-1
1
0
sinsin(45)0.7071068
sqrtsqrt(4)2
sqrsqr(2)4
tantan(45)1