Fundamentals: Math
SmartCAM supports a number of built-in math operations and functions. These math functions can be used in macros and in the expression evaluator in input fields.
Math Operations
These are the basic math operators.
Operator | Meaning |
---|---|
+ | Add |
- | Subtract |
* | Multiply |
/ | Divide |
^ | Exponential |
Basic Math Functions
A number of basic math functions are supported. The Operator column displays the function name, as well as the function's parameters and return value.
Trigonometric Functions
The following list of trigonometric functions are supported. The Operator column displays the function name, as well as the function's parameters and return value.
Useful Tips
All of the trigonometric functions can take a Number as the function parameter; however, it is recommended that you only use Decimal values,not Integers.
Order of Operations
SmartCAM uses the following math convention for order of operations:
- Calculation of exponentials
- Multiplication or division, left to right
- Addition or subtraction, left to right
You can control the order of operations by using parentheses. During evaluation, calculations in the innermost parentheses are handled first. For example:
If(#V6=(2 * (3.14159 * #ARAD ^ 2)))
Calculations are preformed in the following order:
- Raises the arc radius (#ARAD) to the second power
- Multiplies the resulting value by PI (3.14159)
- Multiplies the resulting value by 2
- Tests whether
#V6
equals the resulting value
Related Topics