Math Functions
From Wiki001
The math functions are used for more advanced things, when you need Map001 to give you more room and create some pretty interesting systems.
Most of the simple functionality of these functions can be done through the use of Variable Operation, or when you must assign something to an object.
Contents |
Arithmetic
- Addition
- Returns the sum of the two numbers. Text scripting may use the + operator.
- Subtract
- Returns the subtraction of the second number from the first number. Text scripting may use the - operator.
- Multiply
- Returns the multiplication of the two numbers. Text scripting may use the * operator.
- Division
- Returns the first number divided by the second number. Text scripting may use the / operator.
- Integer Division
- Returns the first number rounded divided by the second number rounded, then rounds that number. Text scripting may use the \ operator.
- Remainder of Division (Modulus)
- Returns the remainder of a division. Text scripting may use the Mod operator.
- Power of
- Returns the first number to the power of the second number. Text scripting may use the ^ operator.
- Square Root
- Returns the square roof of the number.
Numbers
- Absolute
- Returns the number as a positive number if not a positive number already.
- Integer Portion (Round Down)
- Returns the integer portion of a number. Essentially, rounds down to whole number if not a whole number.
- Round Up
- Returns number rounded up to whole number if not a whole number.
- Round To Nearest Whole
- Returns number rounded to nearest whole number.
Miscellaneous
- Random Number
- Returns a random number from the range specified from the first number to the second number.
Statistics
- Percentage Deviation
- Returns a number with a +/- increase of the percentage specified by the second number, from the first number.
Trigonometry
These functions are advance mathematical features used to retrieve certain things based on angles. The most practical use, is getting the x and y components of a direction; that is, Cosine for the X and Sine for the Y, using a direction as the value.

