Skip to main content
Version: Next

Class: NumericRange

Defined in: packages/utilities/src/NumericRange.ts:5

Constructors

Constructor

new NumericRange(from, count): NumericRange

Defined in: packages/utilities/src/NumericRange.ts:10

Parameters

from

number

count

number

Returns

NumericRange

Properties

count

readonly count: number

Defined in: packages/utilities/src/NumericRange.ts:7


from

readonly from: number

Defined in: packages/utilities/src/NumericRange.ts:6


toInclusive

readonly toInclusive: number

Defined in: packages/utilities/src/NumericRange.ts:8

Methods

contains()

contains(value): boolean

Defined in: packages/utilities/src/NumericRange.ts:38

Parameters

value

number

Returns

boolean


equal()

equal(other): boolean

Defined in: packages/utilities/src/NumericRange.ts:34

Parameters

other

NumericRange

Returns

boolean


forEach()

forEach(action): void

Defined in: packages/utilities/src/NumericRange.ts:72

Parameters

action

(value) => void

Returns

void


intersectionWith()

intersectionWith(range): undefined | NumericRange

Defined in: packages/utilities/src/NumericRange.ts:50

Parameters

range

NumericRange

Returns

undefined | NumericRange


intersects()

intersects(range): boolean

Defined in: packages/utilities/src/NumericRange.ts:42

Parameters

range

NumericRange

Returns

boolean


intersectsOrCoinciding()

intersectsOrCoinciding(range): boolean

Defined in: packages/utilities/src/NumericRange.ts:46

Parameters

range

NumericRange

Returns

boolean


isInside()

isInside(range): boolean

Defined in: packages/utilities/src/NumericRange.ts:61

Parameters

range

NumericRange

Returns

boolean


toArray()

toArray(): number[]

Defined in: packages/utilities/src/NumericRange.ts:30

Returns

number[]


toString()

toString(): string

Defined in: packages/utilities/src/NumericRange.ts:78

Returns

string


union()

union(range): NumericRange

Defined in: packages/utilities/src/NumericRange.ts:65

Parameters

range

NumericRange

Returns

NumericRange


values()

values(): Generator<number>

Defined in: packages/utilities/src/NumericRange.ts:24

Returns

Generator<number>


createFromInterval()

static createFromInterval(from, toInclusive): NumericRange

Defined in: packages/utilities/src/NumericRange.ts:20

Parameters

from

number

toInclusive

number

Returns

NumericRange


isNumericRange()

static isNumericRange(value): value is NumericRange

Defined in: packages/utilities/src/NumericRange.ts:82

Parameters

value

any

Returns

value is NumericRange