Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the sum of two values.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the difference of two values.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the product of two values.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the quotient of two values.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the modulo operation (the remainder of a quotient) of two values.
Note: remainder or % will always return a value with the same sign as the divisor.
Example: remainder(10, 3) or 10 % 3 will return 1 because 10 / 3 equals 3 with a remainder of 1.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns value1 raised to the power of value2.
Equivalent to ** operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns value1 shifted left by value2 bits.
Equivalent to << operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns value1 shifted right by value2 bits.
Equivalent to >> operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the bitwise AND of two values.
Equivalent to & operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the bitwise XOR of two values.
Equivalent to ^ operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the bitwise OR of two values.
Equivalent to | operator.
Arguments: 1) real: value Return Type: real
Returns the bitwise NOT of the value.
Equivalent to ~~ operator.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the lesser of the two values.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the greater of the two values.
Arguments: 1) real: value Return Type: real
Returns the natural (base e) logarithm of the value.
Arguments: 1) real: value Return Type: real
Returns the common (base 10) logarithm of the value.
Arguments: 1) real: angle Return Type: real
Returns the cosine of the angle.
Cosine is a value between -1 and 1 that corresponds to the x-value in a coordinate plane.
Arguments: 1) real: angle Return Type: real
Returns the sine of the angle.
Sine is a value between -1 and 1 that corresponds to the y-value in a coordinate plane.
Arguments: 1) real: angle Return Type: real
Returns the tangent of the angle.
Tangent is the slope of the line created by the angle (x/y).
Arguments: 1) real: value Return Type: real
Returns the arccosine of the angle.
acos(cos(x)) = x, if x is between 0 and 180.
Arguments: 1) real: value Return Type: real
Returns the arcsine of the value.
asin(sin(x)) = x, if x is between -90 and 90.
Arguments: 1) real: value Return Type: real
Returns the arctangent of the value.
atan(tan(x)) = x, if x is between -90 and 90.
Arguments: 1) real: y 2) real: x Return Type: real
Returns the arctangent of y/x, which is the angle from (0, 0) to (x, y).
The angle will be in the range -180 < a <= 180, where a is the returned value.
Useful for getting the angle from one point to another point.
For example, the angle from the boss to the player is atan2(player y - boss y, player x - boss x).
Arguments: 1) real: value Return Type: real
Returns the square root of the value.
Arguments: 1) real: value Return Type: real
Returns the cubic root of the value.
Arguments: 1) real: value1 2) real: value2 Return Type: real
Returns the hypotenuse of a right-angled triangle whose legs are value1 and value2.
Arguments: 1) real: value Return Type: real
Returns the cotangent of the value.
Arguments: 1) real: value Return Type: real
Returns the cosecant of the value.
Arguments: 1) real: value Return Type: real
Returns the secant of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic cosine of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic sine of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic tangent of the value.
Arguments: 1) real: value Return Type: real
Returns the area hyperbolic cosine of the value.
Arguments: 1) real: value Return Type: real
Returns the area hyperbolic sine of the value.
Arguments: 1) real: value Return Type: real
Returns the area hyperbolic tangent of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic cotangent of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic cosecant of the value.
Arguments: 1) real: value Return Type: real
Returns the hyperbolic secant of the value.
Arguments: 1) real: min 2) real: max Return Type: real
Returns a random real value between the two values.
Arguments: 1) real: min 2) real: max Return Type: real
Returns a random integer value between the two values.
Arguments: 1) real: min 2) real: max Return Type: real
Returns a predetermined random real value between min and max, of which the seed is set with psrand
Arguments: 1) real: min 2) real: max Return Type: real
Returns a predetermined random integer value between min and max, of which the seed is set with psrand
Arguments: 1) real: seed
Initialize the random number sequence for the prand and prand_int functions.
If not set, it will be 1 by default.
Arguments: 1) real: value Return Type: real
Returns the value as an integer.
Values of 0.5 or greater are rounded up; otherwise they are rounded down.
Arguments: 1) real: value Return Type: real
Returns the value with no decimal places.
For instance, 1.123 becomes 1.
The shortened name trunc can also be used to refer to this function.
Arguments: 1) real: value Return Type: real
Returns the value rounded up to the next integer.
Arguments: 1) real: value Return Type: real
Returns the value rounded down to the next integer.
Arguments: 1) real: value Return Type: real
Returns the value as an absolute number (if it is negative, it will be changed to a positive).
The shortened name abs can also be used to refer to this function.
Arguments: 1) real: value Return Type: real
Returns a modulus of the first value. Modulus provides the remainder of the division (7 modulo 5 would be 2).
Note: unlike remainder, modc returns a value with the same sign as the dividend: modc(-7, 4) equals -3 and modc(7, -4) equals 3.
Arguments: 1) real: value Return Type: real
Returns the value of pi.
Arguments: 1) real: value Return Type: real
Adds 1 to the value, then returns it.
Arguments: 1) real: value Return Type: real
Subtracts 1 from the value, then returns it.
Arguments: 1) real: value Return Type: real
Negates the value, then returns it.
This changes positive values to negative and vice-versa.
Equivalent to unary - operator.