General Math functions. More...
Public Member Functions | |
| decimal | Cos (decimal x) |
| Returns the cosine of an angle of x radians. | |
| decimal | Sin (decimal x) |
| Returns the sine of an angle of x radians. | |
| decimal | Tan (decimal x) |
| Returns the tangent of an angle of x radians. | |
| decimal | Acos (decimal x) |
| Returns the arccosine of x. | |
| decimal | Asin (decimal x) |
| Returns the arcsine of x. | |
| decimal | Atan (decimal x, decimal y) |
| Returns the arctangent angle (in radians) from x and y. | |
| decimal | Distance (number x1, number y1, number x2, number y2) |
| Gets the distance from (x1,y1) to (x2,y2) in pixels. | |
| decimal | Direction (number x1, number y1, number x2, number y2) |
| Gets the angle from (x1,y1) to (x2,y2) in radians. | |
| number | Abs (number n) |
| Gets the absolute value of a Number. | |
| number | Min (number a, number b) |
| Gets the lesser value of two Number values. | |
| number | Max (number a, number b) |
| Gets the greater value of two Number values. | |
| number | Clamp (number n, number minValue, number maxValue) |
| Gets the value clamped between a range. | |
| decimal | Sign (number n) |
| Gets the sign associated with a decimal value. | |
| integer | Uint8 (integer n) |
| Converts an integer to an 8-bit unsigned value. | |
| integer | Uint16 (integer n) |
| Converts an integer to a 16-bit unsigned value. | |
| integer | Uint32 (integer n) |
| Converts an integer to a 32-bit unsigned value. | |
| integer | Uint64 (integer n) |
| Converts an integer to a 64-bit unsigned value. | |
| decimal | Random () |
| Get a random number between 0.0 and 1.0. | |
| decimal | RandomMax (number max) |
| Gets a random number between 0.0 and a specified maximum. | |
| decimal | RandomRange (number min, number max) |
| Gets a random number between specified minimum and a specified maximum. | |
| integer | Floor (number n) |
| Rounds the number n downward, returning the largest integral value that is not greater than n. | |
| decimal | Ceil (number n) |
| Rounds the number n upward, returning the smallest integral value that is not less than n. | |
| decimal | Round (number n) |
| Rounds the number n. | |
| decimal | Sqrt (number n) |
| Retrieves the square root of the number n. | |
| decimal | Pow (number n, number p) |
| Retrieves the number n to the power of p. | |
| decimal | Exp (number p) |
| Retrieves the constant e (2.717) to the power of p. | |
General Math functions.
| number Math.Abs | ( | number | n | ) |
Gets the absolute value of a Number.
| n | Number value. |
| decimal Math.Acos | ( | decimal | x | ) |
Returns the arccosine of x.
| x | Number value to get the arccosine of. |
| decimal Math.Asin | ( | decimal | x | ) |
Returns the arcsine of x.
| x | Number value to get the arcsine of. |
| decimal Math.Atan | ( | decimal | x, |
| decimal | y ) |
Returns the arctangent angle (in radians) from x and y.
| x | x value. |
| y | y value. |
| decimal Math.Ceil | ( | number | n | ) |
Rounds the number n upward, returning the smallest integral value that is not less than n.
| n | Number to be rounded. |
| number Math.Clamp | ( | number | n, |
| number | minValue, | ||
| number | maxValue ) |
Gets the value clamped between a range.
| n | Number value. |
| minValue | Minimum range value to clamp to. |
| maxValue | Maximum range value to clamp to. |
| decimal Math.Cos | ( | decimal | x | ) |
Returns the cosine of an angle of x radians.
| x | Angle (in radians) to get the cosine of. |
| decimal Math.Direction | ( | number | x1, |
| number | y1, | ||
| number | x2, | ||
| number | y2 ) |
Gets the angle from (x1,y1) to (x2,y2) in radians.
| x1 | X position of first point. |
| y1 | Y position of first point. |
| x2 | X position of second point. |
| y2 | Y position of second point. |
| decimal Math.Distance | ( | number | x1, |
| number | y1, | ||
| number | x2, | ||
| number | y2 ) |
Gets the distance from (x1,y1) to (x2,y2) in pixels.
| x1 | X position of first point. |
| y1 | Y position of first point. |
| x2 | X position of second point. |
| y2 | Y position of second point. |
| decimal Math.Exp | ( | number | p | ) |
Retrieves the constant e (2.717) to the power of p.
| p | Exponent. |
| integer Math.Floor | ( | number | n | ) |
Rounds the number n downward, returning the largest integral value that is not greater than n.
| n | Number to be rounded. |
| number Math.Max | ( | number | a, |
| number | b ) |
Gets the greater value of two Number values.
| a | Number value. |
| b | Number value. |
| number Math.Min | ( | number | a, |
| number | b ) |
Gets the lesser value of two Number values.
| a | Number value. |
| b | Number value. |
| decimal Math.Pow | ( | number | n, |
| number | p ) |
Retrieves the number n to the power of p.
| n | Number for the base of the exponent. |
| p | Exponent. |
| decimal Math.Random | ( | ) |
Get a random number between 0.0 and 1.0.
| decimal Math.RandomMax | ( | number | max | ) |
Gets a random number between 0.0 and a specified maximum.
| max | Maximum non-inclusive value. |
| decimal Math.RandomRange | ( | number | min, |
| number | max ) |
Gets a random number between specified minimum and a specified maximum.
| min | Minimum non-inclusive value. |
| max | Maximum non-inclusive value. |
| decimal Math.Round | ( | number | n | ) |
Rounds the number n.
| n | Number to be rounded. |
| decimal Math.Sign | ( | number | n | ) |
Gets the sign associated with a decimal value.
| n | Number value. |
| decimal Math.Sin | ( | decimal | x | ) |
Returns the sine of an angle of x radians.
| x | Angle (in radians) to get the sine of. |
| decimal Math.Sqrt | ( | number | n | ) |
Retrieves the square root of the number n.
| n | Number to be square rooted. |
| decimal Math.Tan | ( | decimal | x | ) |
Returns the tangent of an angle of x radians.
| x | Angle (in radians) to get the tangent of. |
| integer Math.Uint16 | ( | integer | n | ) |
Converts an integer to a 16-bit unsigned value.
| n | Integer value to convert. |
| integer Math.Uint32 | ( | integer | n | ) |
Converts an integer to a 32-bit unsigned value.
| n | Integer value to convert. |
| integer Math.Uint64 | ( | integer | n | ) |
Converts an integer to a 64-bit unsigned value.
| n | Integer value to convert. |
| integer Math.Uint8 | ( | integer | n | ) |
Converts an integer to an 8-bit unsigned value.
| n | Integer value to convert. |