Mathematic Functions

The symbols on your keyboard to use for the basic math functions are as follows:

+          addition

-           subtraction

*           multiplication

/          division

 

There are rules of precedence to control which operations are done first. For example, multiplication and division happen before addition and subtraction.  You may wish to use parentheses in order to override the rules or to make your intentions clear.

4 + 3 * 2       :  10

(4 + 3) * 2     :  14

There is no limit to how many sets of nested or consecutive parentheses you can use. Just be sure that for every opening parenthesis, there is a matching one to close.

 

The following are a few of the mathematic functions available to your expressions.  For a complete list, please refer to the VTS Programmer’s Guide, Math Functions.  (All math functions can be used in an expression.)

 

Max(a, b, c, …)                    Returns the variable having the largest value.

Pow(a, b)                              Returns the value of a raised to the power of b.

Sqrt(a)                                   Returns the square root of the value in a.

Int(a)                                      Returns the number with any digits following the decimal point truncated.

Sin(a)                                     Returns the trigonometric sine of a.

Cos(a)                                    Returns the trigonometric cosine of a.