searchStrictlyIncreasingNumbers MethodStatic

Given an array of strictly increasing numbers, find the index of the largest number that is less than or equal to value.

  • Get an initial estimate by proportions of value and the first and last entries.
  • Linear search from there for final value.
  • For regularly spaced numbers (e.g., data is the _facetStart indices for a triangulated mesh or a quad mesh), the proportional estimate will be immediately correct.

searchStrictlyIncreasingNumbers(data: number[], value: number): undefined | number

Parameter Type Description
data number[]  
value number  

Returns - undefined | number

Defined in

Last Updated: 21 February, 2025