Math Functions

Top  Previous  Next

There are a set of Math functions that are available when writing Calculated Pen Scripts. These Math functions are:

 

acos(x)- returns the arccosine of x.
asin(x)- returns the arcsine of x.
atan(x)- returns the arctangent of x.
atan2(y,x) - returns the atan y divided by x.
ceil( x)- returns the smallest integer value greater than or equal to x.
cos(x)- returns the cosine of x.
cosh(x)- returns the hyperbolic cosine of x.
degrees(x)- converts x from radians to degrees.
radians(x)- converts x from degrees to radians.
exp(x)- returns e ^ x.
fabs(x)- returns the absolute value of x.
floor(x)- returns the largest integer value less than or equal to x.
fmod(x)- returns x % y.
hypot(x,y)- returns the Euclidean distance.
ldexp(x,i)- reurns x * (2 ^ i).
log(x)- returns the natural logarithm of x.
log(x, base)- returns the logarithm of x to the given base.
log10(x)- returns base 10 logarithm of x.
pow(x,y)- returns x ^ y.
sin(x) returns the sine of x.
sinh(x)- returns the hyperbolic sine of x.
tan(x)- returns the tangent of x.
tanh(x) returns the hyperbolic tangent of x.

 

There are also mathematical constants that are available. These constants are pi and e.