@univerjscorefunctionsBinarysearcharray

@univerjs/core v0.5.0-beta.1Docs


Function: binarySearchArray()

function binarySearchArray(arr, pos): number

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

Defined in

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