@univerjscorefunctionsBinarysearcharray

@univerjs/core v0.5.4


Function: binarySearchArray()

function binarySearchArray(arr, pos): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/array-search.ts:71

Return the index of the first value in an ascending array that is greater than the target value. If there is no value greater than the target, return last index.

Parameters

ParameterType
arrnumber[]
posnumber

Returns

number