Function subtract( array1, array2 )
- Description:
-
Returns the result of subtracting one numeric array from the other
element by element.
Both arrays must be numeric, and the arrays must have the same length.
If either of those conditions is not true,
null
is returned.
The types of the arrays do not need to be the same,
so for example it is permitted to subtract an integer array
from a floating point array.
- Parameters:
-
- array1 (Object)
- first array of numeric values
- array2 (Object)
- second array of numeric values
- Return Value (array of floating point):
- element-by-element difference of
array1
and array2
,
the same length as the input arrays
- Example:
subtract(array(1,2,3), array(0.1,0.2,0.3))
= [0.9, 1.8, 2.7]
- Signature:
- double[] subtract(Object, Object)