# Common Functions

## Abs(x)

Absolute value of (x)

## Ceil(x)

Integer value which is greater than (x).

## CubeRt(x)

Closest approximation of the cube root of (x)

## Dist(x1,y1,x2,y2)

Returns the distance between two dimensional points (x1,y1) and (x2,y2).

## Dist3D(x1,y1,z1,x2,y2,z2)

Returns the distance between three dimensional points (x1,y1,z1) and (x2,y2,z2).

## Floor(x)

Integer value which is less than (x).

## Int(x)

Integer value of (x)

## isNumber(n\$)

This function returns true (1) if the string parameter is a valid numeric expression, if not false (0) is returned.

## Max(x,y)

Returns the most positive (closest to positive infinity) of the two arguments.

## Min(x,y)

Returns the most negative (closest to negative infinity) of the two arguments.

## Pow(x,y)

Closest approximation of the result of raising (x) to the power of (y). (x^y). This function is included to maintain backwards compatibility. Generally the ^ operator should be used.

## Rnd(x)

Returns an integer pseudo-random number between 0 and int(x)-1 inclusive. If (x) is 1, then returns a rational number between 0.0 (inclusive) and 1.0. If (x) is negative then the random number generator is seeded with the system time in milliseconds.

## Round(x)

Returns the result of rounding (x) to an integer. The result is equivalent to Floor(x+0.5).

## SciNot\$(x)

Returns a string containing the value of (x) in scientific notation.

## Sign(x)

Returns the sign of (x). If (x) is less than zero, it returns -1. If (x) is greater than zero, 1 is returned. If (x) is 0, 0 is returned.

## Sqrt(x)

Closest approximation of the square root of (x)

# Trigonometry

By default the trig functions are in radians.

## Degree

 Pi Constant value closest to pi, the ratio of a circle's circumference to its diameter. Sin(x) Closest approximation of the sine of (x) SinH(x) Closest approximation of the hyperbolic sine of (x) Cos(x) Closest approximation of the cosine of (x) CosH(x) Closest approximation of the hyperbolic cosine of (x) Tan(x) Closest approximation of the tangent of (x) ASin(x) Closest approximation of the arc sine of (x) within the range [-pi/2..pi/2] ACos(x) Closest approximation of the arc cosine of (x) within the range [0..pi] ATan(x) Closest approximation of the arc tangent of (x) within the range [-pi/2..pi/2] ATan2(x,y) Closest approximation of the arc tangent of y/x within the range [-pi..pi]. This is the angle of the polar representation of the rectangular coordinates (x,y). Hypot(x,y) Returns sqrt(x^2+ y^2). The final result is without medium underflow or overflow. Deg(Rad) Returns the measure in degrees of the supplied radian angle(Rad). The result is (Rad) * 180 / pi. Rad(Deg) Returns the measure in radians of the supplied degree angle(Deg). The result is (Deg) / 180 * pi.

# Logarithm

 e Constant value closest to e, the base of the natural logarithm. Exp(x) Closest approximation of the raising "e" to the power of (x) Ln(x) Closest approximation of the natural logarithm of (x) same as Log(x) Log(x) Closest approximation of the natural logarithm of (x) same as Ln(x) Log10(x) Closest approximation of the base 10 logarithm of (x)

# Screen

 ScreenX() Returns the screen width (Max X coordinate). ScreenY() Returns the screen height (Max Y coordinate).