Threshold 1D Array function
Object information | |
---|---|
Owning palette(s) | Array palette |
Type | Function |
Requires | Basic Development Environment |
The Threshold 1D Array function takes a one-dimensional array of numeric values to calculate the fractional index of the first element that intersects a given threshold in positive direction.
Usage
Connect a one-dimensional array to the array of numbers or points input terminal and specify a threshold value at threshold y. The return value will be a fractional index of the first element that intersects the threshold in positive direction.
Specify an index to start searching from at start index. The return value will be a fractional index of the first element that intersects the threshold in positive direction or the element at the specified index if no match is found.
This function always returns the index of the last element if the threshold is higher than any value in the source array.
Best practice
- Multiply the source array with
-1
to find the first element that intersects a given threshold value in negative direction. - Use the Reverse 1D Array function on the source array to find the last element that intersects a given threshold in positive direction.