Double Array CommandsAboutThis functionset gives you many commands you already know from mel (+ a few extras) wrapped so they work with arrays. Important conventionsAll commands don’t change the actual data in place, but create a new output. Summary | This functionset gives you many commands you already know from mel (+ a few extras) wrapped so they work with arrays. | | | | | | Get number of doubles in a double array | | Append elements to the end of a double array | | Get elements from a double array | | Set elements in a double array, this function will not grow the double array, but error when you try to set an invalid array element! | | Add two double arrays together elementwise | | Subtract two double arrays elementwise | | Multiply componentwise two double arrays together | | Division of double and double | | Negate doubles in an array | | Check if two mDblArray elements are exactly equal | | Check if mDblArray elements are not equal | | Check if elements of two double arrays are equivalent within a tolerance | | return the minimum of the two values | | return the maximum of the two values | | Get absolute value of doubles in an array | | get the sign of a double, -1 if dbl<0, 0 if dbl=0 and 1 if dbl>0 | | Convert degrees to radians | | Convert radians to degrees | | Get sine value of doubles in an array | | Get cosine value of doubles in an array | | Get tangent value of doubles in an array | | Get arc sine value of doubles in an array | | Get arc cosine value of doubles in an array | | Get arc tangent value of doubles in an array | | Get hyperbolic sine value of doubles in an array | | Get hyperbolic cosine value of doubles in an array | | Get hyperbolic tangent value of doubles in an array | | Get natural logarithm value of doubles in an array | | Get base 10 logarithm value of doubles in an array | | Raises the first argument to the power of the second argument | | Returns the floating-point remainder of the division of it arguments A and B | | round value towards zero to the nearest integer | | get fractional part of a dbl | | Get largest integral value not greater than value of doubles in an array | | Compute smallest integral value not less than double in an array | | Compute square root of double in an array | | Compute cubic root of double in an array | | linear interpolation of two doubles | | Round mDblArray elements to a specific digit | | clamp value between min and max value | | returns 1 if A is between min and max (inclusive) 0 else | | Returns value between 0 and 1 representing percentage of the distance between MIN and MAX represented by A. | | Returns value between newMin and newMax that isrelative to A in the range between oldMin and oldMax |
mDblCreate| #define mel mDblCreate( | int | $count, | | float | $template | ) |
|
Create a double array Parameters| none | return a single double value 0 or | | count | return count null doubles or | | count | the number of double elements to create | | template | the template double which will be used for creation |
ReturnsThe double array as a float array of its elements
mDblSize| #define mel int mDblSize( | float | $doubleArrayA[] | ) |
|
Get number of doubles in a double array Parameters| doubleArrayA | double array Returns: |
The size of the double array
mDblAppend| #define mel mDblAppend( | float | $doubleArrayA[], | | float | $doubleArrayB[] | ) |
|
Append elements to the end of a double array Parameters| doubleArrayA | double array to extract elements to | | doubleArrayB | double array to append Returns: |
The new double array of as a float array of its elements
mDblGet| #define mel mDblGet( | float | $doubleArrayA[], | | int | $id[], | | float | $doubleArrayB[] | ) |
|
Get elements from a double array Parameters| doubleArrayA | double array to extract elements from | | ids | int array of ids to extraxt from the double array optional | | doubleArrayB | double array that will be used as a substitution if an id does not exist in array A, must be 1 or same size than id array Returns: |
The double array of as a float array of its elements
mDblSet| #define mel mDblSet( | float | $doubleArrayA[], | | int | $id[], | | float | $doubleArrayB[] | ) |
|
Set elements in a double array, this function will not grow the double array, but error when you try to set an invalid array element! Parameters| doubleArrayA | base double array | | ids | int array of ids defining where in A to insert B | | doubleArrayB | double array of elements to be inserted into A, must be size 1 or same size than id array Returns: |
The double arrayA with elements inserted of of as a float array of its elements
mDblAdd| #define mel mDblAdd( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Add two double arrays together elementwise Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returns$dblArrayA + $dblArrayB, the sum of the two double arrays elementswise as a float[]
mDblSub| #define mel mDblSub( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Subtract two double arrays elementwise Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returns| $dblArrayA | $dblArrayB, the difference of the two double arrays elementswise as a float[] |
mDblMult| #define mel mDblMult( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Multiply componentwise two double arrays together Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returns$dblArrayA * $dblArrayB, the produkt of the two double arrays as a float[]
mDblDiv| #define mel mDblDiv( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Division of double and double Parameters| $dblArrayA | the double array | | $dblArrayB | the double array |
Returns$dblArrayA / $dblArrayB, the product of the two arrays as a float[]
mDblNegate| #define mel mDblNegate( | float[] | $dblArrayA | ) |
|
Negate doubles in an array Parameters| $dblArrayA | the double array |
Returns-($dblArrayA) , the negated doubles in an array as a float[]
mDblIsEqual| #define mel mDblIsEqual( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Check if two mDblArray elements are exactly equal Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returns$dblArrayA == $dblArrayB, the result of the elementwise comparison as a float[] of (0,1)
mDblIsNotEqual| #define mel mDblIsNotEqual( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
Check if mDblArray elements are not equal Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returns$dblArrayA != $dblArrayB, the result of the elementwise comparison as a float[] of (0,1)
mDblIsEquivalent| #define mel mDblIsEquivalent( | float[] | $dblArrayA, | | float[] | $dblArrayB | ), float[] $toleranceArray) |
|
Check if elements of two double arrays are equivalent within a tolerance Parameters| $dblArrayA | the first matrix array | | $dblArrayB | the second matrix array | | $toleranceArray | the maximum amount of error allowed |
Returnsthe result of the comparison as a float array of (0,1)
mDblMin| #define mel mDblMin( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
return the minimum of the two values Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returnsthe result a float[]
mDblMax| #define mel mDblMax( | float[] | $dblArrayA, | | float[] | $dblArrayB | ) |
|
return the maximum of the two values Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array |
Returnsthe result a float[]
mDblAbs| #define mel mDblAbs( | float[] | $dblArrayA | ) |
|
Get absolute value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the absolut doubles as a float[]
mDblSign| #define mel mDblSign( | float[] | $dblArrayA | ) |
|
get the sign of a double, -1 if dbl<0, 0 if dbl=0 and 1 if dbl>0 Parameters| $dblArrayA | the double array |
Returnsthe result in an array of float[]
mDblDegToRad| #define mel mDblDegToRad( | float[] | $dblArrayA | ) |
|
Convert degrees to radians Parameters| $dblArrayA | the double array |
Returnsthe converted doubles in an array of float[]
mDblRadToDeg| #define mel mDblRadToDeg( | float[] | $dblArrayA | ) |
|
Convert radians to degrees Parameters| $dblArrayA | the double array |
Returnsthe converted doubles in an array of float[]
mDblSin| #define mel mDblSin( | float[] | $dblArrayA | ) |
|
Get sine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the sine of doubles as a float[]
mDblCos| #define mel mDblCos( | float[] | $dblArrayA | ) |
|
Get cosine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the cosine of doubles as a float[]
mDblTan| #define mel mDblTan( | float[] | $dblArrayA | ) |
|
Get tangent value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the tangent of doubles as a float[]
mDblASin| #define mel mDblASin( | float[] | $dblArrayA | ) |
|
Get arc sine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the arc sine of doubles as a float[]
mDblACos| #define mel mDblACos( | float[] | $dblArrayA | ) |
|
Get arc cosine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the arc cosine of doubles as a float[]
mDblATan| #define mel mDblATan( | float[] | $dblArrayA | ) |
|
Get arc tangent value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the arc tangent of doubles as a float[]
mDblHSin| #define mel mDblHSin( | float[] | $dblArrayA | ) |
|
Get hyperbolic sine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the hyperbolic sine of doubles as a float[]
mDblHCos| #define mel mDblHCos( | float[] | $dblArrayA | ) |
|
Get hyperbolic cosine value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the hyperbolic cosine of doubles as a float[]
mDblHTan| #define mel mDblHTan( | float[] | $dblArrayA | ) |
|
Get hyperbolic tangent value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the hyperbolic tangent of doubles as a float[]
mDblLog| #define mel mDblLog( | float[] | $dblArrayA | ) |
|
Get natural logarithm value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the natural logarithm of doubles as a float[]
mDblLog10| #define mel mDblLog10( | float[] | $dblArrayA | ) |
|
Get base 10 logarithm value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the base 10 logarithm of doubles as a float[]
mDblPow| #define mel mDblPow( | float | $dblArrayA[], | | int | $dblArrayB[] | ) |
|
Raises the first argument to the power of the second argument Parameters| $dblArrayA | the divident double array | | $dblArrayB | the divisor double array |
Returnsresult as a float array of doubles
mDblMod| #define mel mDblMod( | float | $dblArrayA[], | | int | $dblArrayB[] | ) |
|
Returns the floating-point remainder of the division of it arguments A and B Parameters| $dblArrayA | the divident double array | | $dblArrayB | the divisor double array |
Returnsfloating point remainder as a float array of doubles
mDblTrunc| #define mel mDblTrunc( | float[] | $dblArrayA | ) |
|
round value towards zero to the nearest integer Parameters| $dblArrayA | the double array |
Returnsthe nearest integers an array of float[]
mDblFrac| #define mel mDblFrac( | float[] | $dblArrayA | ) |
|
get fractional part of a dbl Parameters| $dblArrayA | the double array |
Returnsfractional part as an array of float[]
mDblFloor| #define mel mDblFloor( | float[] | $dblArrayA | ) |
|
Get largest integral value not greater than value of doubles in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , largest integral value not greater than value of doubles as a float[]
mDblCeil| #define mel mDblCeil( | float[] | $dblArrayA | ) |
|
Compute smallest integral value not less than double in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA , the smallest integral values as a float[]
mDblSqrt| #define mel mDblSqrt( | float[] | $dblArrayA | ) |
|
Compute square root of double in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA ,the square root values as a float[]
mDblCbrtCompute cubic root of double in an array Parameters| $dblArrayA | the double array |
Returns$dblArrayA ,the cubic root values as a float[]
mDblLerp| #define mel mDblLerp( | float[] | $dblArrayA, | | float[] | $dblArrayB, | | float[] | $param | ) |
|
linear interpolation of two doubles Parameters| $dblArrayA | the first double array | | $dblArrayB | the second double array | | $param | the interpolation parameter [0-1] (will be clamped) |
Returnsthe interpolated double array as a float array
mDblRound| #define mel mDblRound( | float | $dblArrayA[], | | int | $dblArrayB[] | ) |
|
Round mDblArray elements to a specific digit Parameters| $dblArrayA | the first double array | | $intArrayB | intArray which defines to which digit after the dot will be rounded, negative numbers will round to the left of the dot |
Returnsthe rounded dblArray elements as a float[]
mDblClamp| #define mel mDblClamp( | float | $dblArrayA[], | | float | $dblArrayMin[], | | float | $dblArrayMax[] | ) |
|
clamp value between min and max value Parameters| $dblArrayA | the value to be clamped as a double array | | $dblArrayMin | the min value double array | | $dblArrayMax | the max value double array |
Returnsthe clamped values as a float[]
mDblPulse| #define mel mDblPulse( | float | $dblArrayA[], | | float | $dblArrayMin[], | | float | $dblArrayMax[] | ) |
|
returns 1 if A is between min and max (inclusive) 0 else Parameters| $dblArrayA | the value to be pulsed | | $dblArrayMin | the min value double array | | $dblArrayMax | the max value double array |
Returnsthe result as a float[]
mDblLinStep| #define mel mDblLinStep( | float | $dblArrayA[], | | float | $dblArrayMin[], | | float | $dblArrayMax[] | ) |
|
Returns value between 0 and 1 representing percentage of the distance between MIN and MAX represented by A. Parameters| $dblArrayA | the parameter value double array | | $dblArrayMin | the min value double array | | $dblArrayMax | the max value double array |
Returnsthe result as a float[]
mDblFit| #define mel mDblFit( | float | $dblArrayA[], | | float | $dblArrayOldMin[], | | float | $dblArrayOldMax[], | | float | $dblArrayNewMin[], | | float | $dblArrayNewMax[] | ) |
|
Returns value between newMin and newMax that isrelative to A in the range between oldMin and oldMax Parameters| $dblArrayA | the parameter value double array | | $dblArrayOldMin | the old min value double array | | $dblArrayOldMax | the old max value double array | | $dblArrayNewMin | the new min value double array | | $dblArrayNewMax | the new max value double array |
Returnsthe result as a float[]
|