koadrobot/math@0.1.41

License: GPL 3.0

Math nodes. 0.0.1 [01.02.2019]: maths.(division, sign, diff, hypot, minmax,...), 0.0.2 [08.02.2019]: degree-trigonometries, 0.0.3: [01.02.2019]: Scale - (number/duty/to-duty), 0.0.4: [04.02.2019]: Avg/Normalize/Ratio, 0.0.5: [05.02.2019]: Discretize - (ceil/floor/round/step), 0.1.0 [11.02.2019]: First Released. 0.1.2: [01.05.2019]: Maths/Aritmatics projects are merged. 0.1.3: [01.05.2019]: num-rev-byte is added. 0.1.4: [01.10.2019]: Tabtests are added. Int, Is-NaN... 0.1.41: [01.10.2019]: Descriptions are added.
NodeDescription
aall-mathsNo description
abs
Outputs absolute value of an input number
acosd
Calculates arc cosine of degree.
add
Adds numbers
asind
Calculates arc sine in degree.
atand
Calculates arc tanjant in degree.
avg
Calculate average of inputs. (di-do is temp values for variadic)
ceil
Rounds a number to a minimal integer that is greater than the number
constrain
Clip number. Min..Max. (calculate min/max for min<x<max)
cosd
Calculates cosine of degree.
cube
Computes the cube (i.e. x³) of an input value.
dbl
Computes the double (i.e. x*x) of an input value.
deg2rad
Convert degree to radian
diff
Delta of two input value. delta=abs(IN1-IN2)
discretize(ceil)
If input `X` is between the threshold `T0`, `T1`, ..., `T𝑛` then output is the LOWER threshold. If `X` is even greater than the last threshold, the value is round down to it.
discretize(floor)
If input `X` is between the threshold `T0`, `T1`, ..., `T𝑛` then output is the UPPER threshold. If `X` is even greater than the last threshold, the value is round down to it.
discretize(round)
If input `X` is between the threshold `T0`, `T1`, ..., `T𝑛` then output is the ROUND threshold. If `X` is even greater than the last threshold, the value is round down to it.
discretize(step)
If input `X` is between the threshold from start to stop. If `X` is even greater than the last threshold, the value is round to it.
div
Divides two numbers. If IN2 is zero return Nan.
division
Division of Div / Quat and results are Divdient and Remainder. Div=(Quat*Trunc)+Rem
floor
Rounds a number to a maximal integer that is less than the number
half
Computes the half(i.e. x/2) of an input value.
hypot
Computes Hypotenous. OUT=sqrt(x*x+y*y)
is-finite
If Number is Finite, Return is True.
is-nan
If Number is NaN, Return is True.
log-10
Computes logarithm of `X` to base `10`.
log-bx
Computes logarithm of `X` to base `B`.
log-e
Computes logarithm of `X`.
max
Return maximum number value of the inputs.
min
Return minimum number value of the inputs
minmax
Return minimum and minimum number values of two input value.
mod
Computes the remainder of `IN1` divided by `IN2`.
multiply
Multiplies numbers
normalize
Normalize X in Start..Stop. Clip X. Output is Norm (0..1.0). Start is 0 of Norm, Stop is 1.0 of Norm. X=-2, Start=10, Stop=0 then Norm is 1.2. Normalize= (X-Start) / (Stop-Start) Sdiff : +..+..--..-- Tdiff : +..--..+..-- Norm=+..--..--..+
num-rev-byte
Convert N to rev byte for display. Out= abs(pow(2,N)-1) input is 0..7 else out is zero.
pow
Computes the power of `BASE` raised to the power exponent `EXP`
pow10
Computes the power of `10` raised to the power exponent `EXP`
pow2
Computes the power of `2` raised to the power exponent `EXP`
rad2deg
Convert radian to degree .
ratio
Ratio = (Sstop-Sstart) / (TStop-TStart) Sdiff : +..+..--..-- Tdiff : +..--..+..-- Ratio=+..--..--..+
round
Rounds a number to nearest integer
scale(duty)
Scale input duty (0..1) to value by Tmin..Tmax (map) with ensure (min<max).
scale(number)
Sacle value (map) with check min<max.
scale(to-duty)
Scale input value to duty (0..1) by Start..Stop (map) with ensure (Start<Stop ).
sign
If IN1>IN2 then SIGN = Pozitive, else IN1<IN2 then SIGN = Negative, else IN1==IN2 then SIGN=0.
sind
Calculates sine in degree.
sqrt
Computes the square root of an input value.
sub
Subtracts two numbers
tand
Calculates tanjant in degree.
trunc
Truncate integer part of number.
sq
Computes the square (i.e. x²) of an input value.
is-norm
If Number is normal pozitive or negative, Return is True. Else If Number is Inf, Zero, NaN then result is false.
To use the nodes in your project you should have the koadrobot/math library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.