Skip to content

Latest commit

 

History

History
95 lines (57 loc) · 4.41 KB

TAMath.Sub.md

File metadata and controls

95 lines (57 loc) · 4.41 KB

TAMath.Sub Method

Overloads
Sub(int, int, double[], double[]) Performs element-wise subtraction of two input arrays.
Sub(int, int, float[], float[]) Performs element-wise subtraction of two input arrays.

TAMath.Sub(int, int, double[], double[]) Method

Performs element-wise subtraction of two input arrays.

public static TechnicalAnalysis.Functions.SubResult Sub(int startIdx, int endIdx, double[] real0, double[] real1);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

real0 System.Double[]

The first input array (minuend).

real1 System.Double[]

The second input array (subtrahend).

Returns

SubResult
A SubResult containing the calculated values where each element is real0[i] - real1[i].

Remarks

This function performs vector subtraction by subtracting corresponding elements of the second array from the first array. The operation is performed for each index i in the range [startIdx, endIdx].

TAMath.Sub(int, int, float[], float[]) Method

Performs element-wise subtraction of two input arrays.

public static TechnicalAnalysis.Functions.SubResult Sub(int startIdx, int endIdx, float[] real0, float[] real1);

Parameters

startIdx System.Int32

The starting index for the calculation.

endIdx System.Int32

The ending index for the calculation.

real0 System.Single[]

The first input array (minuend).

real1 System.Single[]

The second input array (subtrahend).

Returns

SubResult
A SubResult containing the calculated values where each element is real0[i] - real1[i].

Remarks

This overload accepts float arrays and converts them to double arrays before performing the calculation. This may result in a minor performance overhead due to the conversion process.