Data type
NumberRange
Represents a range of numbers.
The NumberRange represents a range of numbers.
NumberRange stores its NumberRange.Min and
NumberRange.Max values as 32-bit floating-point numbers. Very large
numbers or numbers requiring high decimal precision may lose accuracy.
Constructors 2#
| new | Returns a new NumberRange with the minimum and maximum set to
the value. |
| new | Returns a new NumberRange with the provided minimum and
maximum. |
new(value: number)#
Returns a new NumberRange with the minimum and maximum set to
the value.
| Name | Type | Default | Description |
|---|---|---|---|
value | number | The number that both the minimum and maximum of the range are set to. |
new(minimum: number, maximum: number)#
Returns a new NumberRange with the provided minimum and
maximum. The minimum must be less than or equal to maximum.
| Name | Type | Default | Description |
|---|---|---|---|
minimum | number | The lower bound of the range. | |
maximum | number | The upper bound of the range. |
Properties 2#
Minnumber | The minimum value of the NumberRange. |
Maxnumber | The maximum value of the NumberRange. |
Min: number#
The minimum value of the NumberRange, always less than or equal
to the maximum.
Max: number#
The maximum value of the NumberRange, always greater than or
equal to the minimum.