e2 docs number - wiremod/wire GitHub Wiki
Number
= min(
A,
B)
Returns the lowest value Argument (1 ops)
= min(
A,
B,
C)
Returns the lowest value Argument (1 ops)
= min(
A,
B,
C,
D)
Returns the lowest value Argument (1 ops)
= max(
A,
B)
Returns the highest value Argument (1 ops)
= max(
A,
B,
C)
Returns the highest value Argument (1 ops)
= max(
A,
B,
C,
D)
Returns the highest value Argument (1 ops)
= isfinite(
Value)
(2 ops)
= isinf(
Value)
Returns 1 if given value is a positive infinity or -1 if given value is a negative infinity; otherwise 0. (2 ops)
= isnan(
Value)
Returns 1 if given value is not a number (NaN); otherwise 0. (2 ops)
= remap(
Value,
In_min,
In_max,
Out_min,
Out_max)
Remaps an input value with an input minimum value and an input maximum value to an output minimum and output maximum. (2 ops)
= abs(
N)
Returns the Magnitude of the Argument (2 ops)
= ceil(
N)
Rounds the Argument up to the nearest Integer (2 ops)
= ceil(
Value,
Decimals)
Rounds Argument 1 up to Argument 2's decimal precision (2 ops)
= floor(
N)
Rounds the Argument down to the nearest Integer (2 ops)
= floor(
Value,
Decimals)
Rounds Argument 1 down to Argument 2's decimal precision (2 ops)
= round(
N)
Rounds the Argument to the nearest Integer (2 ops)
= round(
Value,
Decimals)
Rounds Argument 1 to Argument 2's decimal precision (2 ops)
= int(
N)
Returns the Integer part of the Argument (always rounds towards zero) (2 ops)
= frac(
N)
Returns the Fractional part (decimal places) of the Argument (2 ops)
= mod(
Lhs,
Rhs)
Modulo, returns the Remainder after Argument 1 has been divided by Argument 2. Note "mod(-1, 3) = -1" (2 ops)
= wrap(
Lhs,
Rhs)
Performs (n1 + n2) % (n2 * 2) - n2 (2 ops)
= clamp(
N,
Low,
High)
If Arg1 = Arg3 (max) returns Arg3; otherwise returns Arg1 (2 ops)
= inrange(
Value,
Min,
Max)
Returns 1 if N is in the interval [N2; N3], 0 otherwise. This means it is equivalent to ((N2 <= N) & (N <= N3)) (2 ops)
= lerp(
From,
To,
Fraction)
Performs linear interpolation. Returns a new value between 'from' and 'to', based on a 0-1 percentage ('fraction') (2 ops)
= sign(
N)
Returns the sign of argument (-1,0,1) [sign(N) = N / abs(N) ] (2 ops)
= random()
Returns a random floating-point number between 0 and 1 [0 <= x < 1 ] (2 ops)
= random(
N)
Returns a random floating-point number between 0 and the specified value [0 <= x < a ] (2 ops)
= random(
Low,
High)
Returns a random floating-point number between the specified interval [a <= x < b ] (2 ops)
= randint(
N)
Returns a random integer from 1 to the specified value [1 <= x <= a ] (2 ops)
= randint(
A,
B)
Returns a random integer in the specified interval [a <= x <= b ] (2 ops)
= factorial(
N)
Returns the Factorial of the Argument (10 ops)
= sqrt(
N)
Returns the Square Root of the Argument (2 ops)
= cbrt(
N)
Returns the Cube Root of the Argument (2 ops)
= root(
N,
Pow)
Returns the Nth Root of the first Argument (2 ops)
= e()
Returns Euler's Constant (2 ops)
= exp(
N)
Returns e to the power of the Argument (same as e()^N but shorter and faster this way) (2 ops)
= frexp(
N)
Returns the mantissa and exponent of the given floating-point number as a vector2 (X component holds a mantissa, and Y component holds an exponent) (2 ops)
= ln(
N)
Returns the logarithm to base e of the Argument (2 ops)
= log2(
N)
Returns the logarithm to base 2 of the Argument (2 ops)
= log10(
N)
Returns the logarithm to base 10 of the Argument (2 ops)
= log(
A,
B)
Returns the logarithm to base Argument 2 of Argument 1 (2 ops)
= inf()
Returns a huge constant (infinity) (1 ops)
= pi()
Returns the constant PI (1 ops)
= toRad(
N)
Converts Degree angles to Radian angles (1 ops)
= toDeg(
N)
Converts Radian angles to Degree angles (1 ops)
= acos(
N)
Returns the inverse cosine of the argument, in degrees (2 ops)
= asin(
N)
Returns the inverse sine of the argument, in degrees (2 ops)
= atan(
N)
Returns the inverse tangent of the argument, in degrees (2 ops)
= atan(
X,
Y)
Returns the inverse tangent of the arguments (arg1 / arg2), in degrees. This function accounts for positive/negative arguments, and arguments at or close to 0 (2 ops)
= atan2(
X,
Y)
(2 ops)
= cos(
N)
Returns the cosine of N degrees (2 ops)
= sec(
N)
Returns the secant of N degrees (2 ops)
= sin(
N)
Returns the sine of N degrees (2 ops)
= csc(
N)
Returns the cosecant of N degrees (2 ops)
= tan(
N)
Returns the tangent of N degrees (2 ops)
= cot(
N)
Returns the cotangent of N degrees (2 ops)
= cosh(
N)
Returns the hyperbolic cosine of N degrees (1.5 ops)
= sech(
N)
Returns the hyperbolic secant of N degrees (1.5 ops)
= sinh(
N)
Returns the hyperbolic sine of N degrees (1.5 ops)
= csch(
N)
Returns the hyperbolic cosecant of N degrees (1.5 ops)
= tanh(
N)
Returns the hyperbolic tangent of N degrees (1.5 ops)
= coth(
N)
Returns the hyperbolic cotangent of N degrees (1.5 ops)
= acosr(
N)
Returns the inverse cosine of the argument, in radians (1.5 ops)
= asinr(
N)
Returns the inverse sine of the argument, in radians (1.5 ops)
= atanr(
N)
Returns the inverse tangent of the argument, in radians (1.5 ops)
= cosr(
N)
Returns the cosine of N radians (1.5 ops)
= secr(
N)
Returns the secant of N radians (1.5 ops)
= sinr(
N)
Returns the sine of N radians (1.5 ops)
= cscr(
N)
Returns the cosecant of N radians (1.5 ops)
= tanr(
N)
Returns the tangent of N radians (1.5 ops)
= cotr(
N)
Returns the cotangent of N radians (1.5 ops)
= coshr(
N)
Returns the hyperbolic cosine of N radians (1.5 ops)
= sechr(
N)
Returns the hyperbolic secant of N radians (1.5 ops)
= sinhr(
N)
Returns the hyperbolic sine of N radians (1.5 ops)
= cschr(
N)
Returns the hyperbolic cosecant of N radians (1.5 ops)
= tanhr(
N)
Returns the hyperbolic tangent of N radians (1.5 ops)
= cothr(
N)
Returns the hyperbolic cotangent of N radians (1.5 ops)
= toString(
Number)
Formats a number as a string. (Numbers may be concatenated into a string without using this function) (5 ops)
=
:toString()
Formats a number as a string. (Numbers may be concatenated into a string without using this function) (5 ops)
= toString(
Number,
Base)
Formats a number as a string, using argument 2 as the base. i.e. using 16 for base would convert the number to hex (10 ops)
=
:toString(
Base)
Formats a number as a string, using argument 2 as the base. i.e. using 16 for base would convert the number to hex (10 ops)