Number Arithmetic & Compounds Assignment
✏ Beginners Scripting Guide ✏
Last updated
✏ Beginners Scripting Guide ✏
Last updated
In this section, we will be discussing number arithmetics. Number arithmetics can be used to create a math expression for your script. Here are the tables.
/
Division
*
Multiplication
+
Addition
-
Subtraction
%
Modulus
^
Exponent
+=
Addition
-=
Subtraction
*=
Multiplication
/=
Division
%=
Modulus
^=
Exponentiation
Division - Division can be used to divide numbers. Multiplication - Multiplication can be used to multiply numbers. Addition - Addition can be used to add numbers. Subtraction - Subtraction can be used to subtract numbers. Modulus - Modulo can be used to find a reminder of a division. Exponent - Exponent takes two value called base and power.The base is mulitplied with itself for power times (ex: 5^2 = 5*5)
This is how you should use arithmetic and compound assignments in a script.