Roblox UtilitiesDevlHub Roblox Documentation

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#

newReturns a new NumberRange with the minimum and maximum set to the value.
newReturns 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.

NameTypeDefaultDescription
valuenumberThe 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.

NameTypeDefaultDescription
minimumnumberThe lower bound of the range.
maximumnumberThe upper bound of the range.

Properties 2#

MinnumberThe minimum value of the NumberRange.
MaxnumberThe 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.