SignalMathGetIndexOfXInAscendingArray Method |
Gets the index of the provided value in an array of ascending elements.
Namespace: Altaxo.Science.SignalsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static int GetIndexOfXInAscendingArray(
double[] xArray,
double x,
bool? roundUp
)
Parameters
- xArray Double
- The x array.
- x Double
- The x value that is searched.
- roundUp NullableBoolean
- If there is no exact match, and the parameter is false, the next lower index will be returned, else if true, the index with the higher value will be returned. If null, the index for which x is closest to the element will be returned..
Return Value
Int32For an exact match with x, the index of x in the array. Otherwise, either the index of a value lower than x (roundUp=false), higher than x (roundUp=true), or closest to x (roundUp=null).
The return value is always a valid index into the provided array.
See Also