Triggers/Category Math

From SC2Mapster Wiki
Jump to: navigation, search

Arithmetic[edit | edit source]

Arithmetic (Integer)[edit | edit source]

  • Function. Returns the addition, subtraction, multiplication or division of the specified integer values.

Clamp (Integer)[edit | edit source]

  • Action. Adjust the value to make sure it stays within the provided bounds.

Arithmetic Multiple (Integer)[edit | edit source]

  • Function. Returns the addition, subtraction, multiplication or division of the specified integer values in multiple instances.

Arithmetic (Real)[edit | edit source]

  • Function. Returns the addition, subtraction, multiplication or division of the specified real values.

Clamp (Real)[edit | edit source]

  • Action. Adjust the value to make sure it stays within the provided bounds.

Arithmetic Multiple (Real)[edit | edit source]

  • Function. Returns the addition, subtraction, multiplication or division of the specified real values in multiple instances.

Ceiling (Real)[edit | edit source]

  • Function. Returns the smallest value that is not less than the argument.

Ceiling (Integer)[edit | edit source]

  • Function. Returns the smallest value that is not less than the argument.

Cycle[edit | edit source]

  • Function. Increments an integer variable by 1, but keeps it within a given range. If this increment causes the variable to exceed the Max value, the variable is reset to the Min value.

Floor (Real)[edit | edit source]

  • Function. Returns the largest value less than or equal to the specified number.

Floor (Integer)[edit | edit source]

  • Function. Returns the largest value less than or equal to the specified number.

Log2 (Real)[edit | edit source]

  • Function. Returns the log base 2 of a number.

Log2 (Integer)[edit | edit source]

  • Function. Returns the log base 2 of a number.

Modulo (Real)[edit | edit source]

  • Function. Uses real values. Returns the remainder after the dividend has been divided by the divisor.

Modulo (Integer)[edit | edit source]

  • Function. Uses integer values. Returns the remainder after the dividend has been divided by the divisor.

Power (Real)[edit | edit source]

  • Function. Returns a value raised to a given power or exponent.

Pow2 (Real)[edit | edit source]

  • Function. Returns 2 to the power of a value.

Pow2 (Integer)[edit | edit source]

  • Function. Returns 2 to the power of a value.

Power (Integer)[edit | edit source]

  • Function. Returns a value raised to a given power or exponent.

Round (Real)[edit | edit source]

  • Function. Returns the value rounded to zero decimal places.

Round (Integer)[edit | edit source]

  • Function. Returns the value rounded to zero decimal places.

Square Root (Real)[edit | edit source]

  • Function. Returns the square root of a number.

Square Root (Integer)[edit | edit source]

  • Function. Returns the square root of a number.

Trunc (Real)[edit | edit source]

  • Function. Strips off the fractional portion of a real.

Trunc (Integer)[edit | edit source]

  • Action. Strips off the fractional portion of a real.

Conditionals[edit | edit source]

Absolute Value (Real)[edit | edit source]

  • Function. Returns the value of the real without regard to the sign of the real.

Absolute Value (Integer)[edit | edit source]

  • Function. Returns the value of the integer without regard to the sign of the integer.

Maximum (Real)[edit | edit source]

  • Function. Returns the highest of the two real values specified.

Maximum (Integer)[edit | edit source]

  • Function. Returns the highest of the two integer values specified.

Minimum (Real)[edit | edit source]

  • Function. Returns the lowest of the two real values specified.

Minimum (Integer)[edit | edit source]

  • Function. Returns the lowest of the two integer values specified.

Random[edit | edit source]

Random Angle[edit | edit source]

  • Function. Returns a random angle between 0 and 360 (inclusive).

Random Real[edit | edit source]

  • Function. Returns a random real between the specified values (inclusive).

Random Integer[edit | edit source]

  • Function. Returns a random integer between the specified values (inclusive).

Random Percent[edit | edit source]

  • Function. Returns a random percentage between 0 and 100 (inclusive).

Trigonometry[edit | edit source]

Arccosine[edit | edit source]

  • Function. Returns the arccosine of a number. Allowed range is -1 to 1. The returned value is given in degrees.

Arcsine[edit | edit source]

  • Function. Returns the arcsine of a number. Allowed range is -1 to 1. The returned value is given in degrees.

Arctangent From Value[edit | edit source]

  • Function. Returns the arctangent of a number. The returned value is given in degrees.

Arctangent From Deltas[edit | edit source]

  • Function. Returns the arctangent of a set of X and Y deltas. The returned value is given in degrees.

Cosine[edit | edit source]

  • Function. Returns the cosine of an angle. The angle should be specified in degrees.

Sine[edit | edit source]

  • Function. Returns the sine of an angle. The angle should be specified in degrees.

Tangent[edit | edit source]

  • Function. Returns the tangent of an angle. The angle should be specified in degrees.