Math
Last updated
Last updated
math.abs
Definition: The absolute value of number
is number
if number
>= 0, or -number
otherwise.
Syntax:
Returns:
Arguments:
Name | Type | Description |
---|---|---|
math.acos
Definition: The acos function returns the arccosine (in radians) of number such that cos(acos(y)) = y for y in range [-1, 1].
Syntax:
Returns:
Arguments:
math.asin
Definition: The asin function returns the arcsine (in radians) of number such that sin(asin(y)) = y for y in range [-1, 1].
Syntax:
Returns:
Arguments:
math.atan
Definition: The atan function returns the arctangent (in radians) of number such that tan(atan(y)) = y for any y.
Syntax:
Returns:
Arguments:
math.avg
Definition: Calculates the average of all given series (elementwise).
Syntax:
Returns:
Arguments:
math.ceil
Definition: Returns the smallest integer greater than or equal to the argument.
Syntax:
Returns:
Arguments:
math.cos
Definition: Returns the trigonometric cosine of an angle.
Syntax:
Returns:
Arguments:
math.exp
Definition: Returns the value of Euler's number raised to the power of the given number.
Syntax:
Returns:
Arguments:
math.floor
Definition: Returns the largest integer less than or equal to the given number.
Syntax:
Returns:
Arguments:
math.log
Definition: Returns the natural logarithm of any number greater than 0.
Syntax:
Returns:
Arguments:
math.log10
Definition: Returns the base 10 logarithm of a number.
Syntax:
Returns:
Arguments:
math.max
Definition: Returns the greatest of multiple values.
Syntax:
Returns:
Arguments:
math.min
Definition: Returns the smallest of multiple values.
Syntax:
Returns:
Arguments:
math.pow
Definition: Mathematical power function.
Syntax:
Returns:
Arguments:
math.random
Definition: Returns a pseudo-random value. The function will generate a different sequence of values for each script execution. Using the same value for the optional seed argument will produce a repeatable sequence.
Syntax:
Arguments:
Returns:
math.round
Definition: Returns the value of number
rounded to the nearest integer, with ties rounding up. If the precision
parameter is used, returns a float value rounded to that amount of decimal places.
Syntax:
Returns:
Arguments:
math.sign
Definition: Sign (signum) of number
is zero if number
is zero, 1.0 if number
is greater than zero, -1.0 if number
is less than zero.
Syntax:
Returns:
Arguments:
math.sin
Definition: The sin function returns the trigonometric sine of an angle.
Syntax:
Returns:
Arguments:
math.sqrt
Definition: Square root of any number
>= 0 is the unique y >= 0 such that y^2 = number
.
Syntax:
Returns:
Arguments:
math.sum
Definition: The sum function returns the sliding sum of last y values of x.
Syntax:
Arguments:
Returns:
math.tan
Definition: The tan function returns the trigonometric tangent of an angle.
Syntax:
Returns:
Arguments:
math.todegrees
Definition: Returns an approximately equivalent angle in degrees from an angle measured in radians.
Syntax:
Arguments:
Returns:
math.toradians
Definition: Returns an approximately equivalent angle in radians from an angle measured in degrees.
Syntax:
Arguments:
Returns:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
number
simple int/float
The number for which to calculate the absolute value.
angle
simple float
The angle in radians for which to calculate the arccosine.
angle
simple float
The angle in radians for which to calculate the arcsine.
angle
simple float
The angle in radians for which to calculate the arctangent.
number0, number1, ...
series float
The series of numbers to calculate the average of. Multiple series can be provided.
number
series float
The number to ceil.
angle
series float
The angle in radians.
number
series float
The number for which to calculate the exponent.
number
series int
The number for which to calculate the floor value.
number
series float
The number for which to calculate the natural logarithm.
number
series float
The number for which to calculate the base 10 logarithm.
number0, number1, ...
series int/float
The values to compare and find the greatest among them.
number0, number1, ...
series int/float
The values to compare and find the smallest among them.
base
series int/float
Specify the base to use.
exponent
series int/float
Specifies the exponent.
min
series int/float
The lower bound of the range of random values. The value is not included in the range. The default is 0.
max
series int/float
The upper bound of the range of random values. The value is not included in the range. The default is 1.
seed
series int
Optional argument. When the same seed is used, allows successive calls to the function to produce a repeatable set of values.
number
series int/float
The value to be rounded.
precision
series int
Optional argument. Decimal places to which number
will be rounded. When no argument is supplied, rounding is to the nearest integer.
number
series int/float
The number for which to determine the sign.
angle
series int/float
Angle, in radians.
number
series int/float
The number to calculate the square root of. It must be greater than or equal to 0.
source
series int/float
Series of values to process.
length
series int
Number of bars (length).
angle
series int/float
Angle, in radians.
radians
series int/float
Angle in radians.
degrees
series int/float
Angle in degrees.