Math and Logical Operators
Key Function
+ a+b (Add)
- a-b (Subtract)
^ a^n (To the nth power)
* a*b (Multiply)
/ a/b (Divide)
(a) precedence
a%b a (integer) modulus b
a' feet
a" inches
HIDD_SPOT_LIGHT=b variable assignment
a == b equal comparison
a != b not equal comparison
a > b greater than comparison
a < b less than comparison
a >= b greater than or equal to comparison
a <= b less than or equal to comparison
a && b logical AND operation
a || b logical OR operation
(a) ? x:y conditional
| a|b (Calculates bitwise or)
& a&b (Calculates bitwise and)
# a#b (Calculates bitwise exclusive or)
>> a>>b (Shift right by count of b)
<< a<<b (Shift left by count of b)
~ ~a (Calculates bitwise inverse)