## Math — `math`

- Type:
`math`

- Output Value:
`number`

#####
*Available: Stacks API v2*

A virtual control to perform simple math.
Most functions that math-controls provide can be more easily performed using template expressions. However, there are still a few ways that math-controls are useful, mostly in enable logic.

Math properties follow a two-argument, one-operator format:
`<argument_1> <operator> <argument_2> = <result>`

Note: There is no `enable`

property for the Math control. The *Math* control cannot be enabled (made visible) itself because a *Math* control is virtual – it has no user interface. A *Math* control also cannot be used to enable other controls. *Math* controls create dependencies between other controls: changes to the input values affect the output. This can create chains of dependency that take too long to evaluate, causing noticable lags in the Info Sidebar UI.

### Argument 1

- Key:
`arg1`

- Type:
`number or string`

- Required

Arguments come in two formats. They can either be a constant number or a string that specifies the ID of some other control. If taking the value from another control, the other control must return a number typed value.

### Argument 2

- Key:
`arg2`

- Type:
`number or string`

- Required

Arguments come in two formats. They can either be a constant number or a string that specifies the ID of some other control. If taking the value from another control, the other control must return a number typed value.

### Operator

- Key:
`operator`

- Type:
`string, on of`

- Required

Operators have the standard C language functions.

### Rounding

- Key:
`round`

- Type:
`Boolean`

- Default Value:
`true`

If the value of round is true, then the output number will be rounded to the nearest whole integer. If the round property is not present on a math function, then the default is to enable rounding.

*Note:* Rounding is enabled by default. To return a floating point value, you must include and disable rounding.