largestInt() Function
Returns the largest integer value in range [min
, max
] that is accepted by the predicate
.
Signature
export declare function largestInt(min: number, max: number, predicate: (value: number) => boolean): number | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
min | number | The minimum value to search for. |
max | number | The maximum value to search for. |
predicate | (value: number) => boolean | A predicate. There should exist some value |
(Returns) | number | undefined | The largest integer value whose predicate returns |