OrderedBase
Defined in: _ordered-defaults.ts:40
Abstract base class that provides default implementations of all
IOrdered boolean comparison methods (eq, lt, lte, gt, gte)
derived from the single abstract cmp method.
Type Parameters
Section titled “Type Parameters”T extends OrderedBase<T>
The concrete numeric type.
Implements
Section titled “Implements”IOrdered<T>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OrderedBase<
T>():OrderedBase<T>
Returns
Section titled “Returns”OrderedBase<T>
Methods
Section titled “Methods”clamp()
Section titled “clamp()”clamp(
lower,upper):T
Defined in: _ordered-defaults.ts:69
Restricts the value to [lower, upper].
Parameters
Section titled “Parameters”T
T
Returns
Section titled “Returns”T
Implementation of
Section titled “Implementation of”
abstractcmp(other):Sign
Defined in: _ordered-defaults.ts:43
Three-way comparison consistent with the total order.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”eq(
other):boolean
Defined in: _ordered-defaults.ts:45
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”gt(
other):boolean
Defined in: _ordered-defaults.ts:57
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”gte(
other):boolean
Defined in: _ordered-defaults.ts:73
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”lt(
other):boolean
Defined in: _ordered-defaults.ts:49
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”lte(
other):boolean
Defined in: _ordered-defaults.ts:53
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”max(
other):T
Defined in: _ordered-defaults.ts:65
The larger of the two operands under the total order.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”T
Implementation of
Section titled “Implementation of”min(
other):T
Defined in: _ordered-defaults.ts:61
The smaller of the two operands under the total order.
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”T