Operators

Table 2.14. operators

typedescriptionexample
&&logical AND 
||logical OR 
!not!1; return 0
+add3 + 2; return 5
-substract3 - 2; return 1
=affectation of value a = 5; var 'a' as the value 5
--decrement by 1a = 5; a--; a is 4
++increment by 1a = 5; a++; a is 6
+=increment by valuea = 5; a += 6; a is 11, equivalent to a = a + value;
-=decrement by valuea = 5; a -= 6; a is -1, equivalent to a = a - value
*multiply3 * 2; return 6
/divide3 / 2; return 1.5
**power, equivalent to math: ^ 3**4; return 81, 3*3*3*3
%modulo, return the entire part of divide15 % 4; return 3
~=Difference between operands is ≤ system.epsilontilde (defaults to 0.0001) 
sgn()sgn(value); give sign of value; return 1 if positive, -1 if negativesgn(-4); sgn(5);