| Overloads | |
|---|---|
| Sin(int, int, double[]) | Calculates the trigonometric sine for each element in the input array. |
| Sin(int, int, float[]) | Calculates the trigonometric sine for each element in the input array. |
Calculates the trigonometric sine for each element in the input array.
public static TechnicalAnalysis.Functions.SinResult Sin(int startIdx, int endIdx, double[] real);startIdx System.Int32
The starting index for the calculation within the array.
endIdx System.Int32
The ending index for the calculation within the array.
real System.Double[]
An array of real values (in radians) to calculate the sine for.
SinResult
A SinResult containing the calculated sine values,
along with the starting index of the result and the number of elements generated.
The sine function takes input values in radians and returns values in the range [-1, 1]. In technical analysis, trigonometric functions are often used in cycle analysis and for generating oscillating indicators. To convert degrees to radians, multiply by π/180.
Calculates the trigonometric sine for each element in the input array.
public static TechnicalAnalysis.Functions.SinResult Sin(int startIdx, int endIdx, float[] real);startIdx System.Int32
The starting index for the calculation within the array.
endIdx System.Int32
The ending index for the calculation within the array.
real System.Single[]
An array of real values (in radians) to calculate the sine for.
SinResult
A SinResult containing the calculated sine values,
along with the starting index of the result and the number of elements generated.
This overload accepts float values for convenience and internally converts them to double precision before performing the calculation. This may result in minor precision differences compared to using double values directly.