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
- polyface/Polyface.ts Line 151
Last Updated: 21 February, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.