new IWRange(minimum, maximum)
Creates a new range object.
Parameters:
Name | Type | Description |
---|---|---|
minimum |
Number | the min value |
maximum |
Number | the max value |
Methods
-
contains(value)
-
Checks if value is in range.
Parameters:
Name Type Description value
Number Returns:
- Type
- Boolean
-
getMax()
-
Returns the maximum value of this range.
Returns:
- Type
- Number
-
getMin()
-
Returns the minimum value of this range.
Returns:
- Type
- Number
-
setMax(maxValue)
-
Sets the maximum value of this range. The value can be between
Number.MIN_VALUE
andNumber.MAX_VALUE
.Parameters:
Name Type Description maxValue
Number Returns:
- Type
- void
-
setMin(minValue)
-
Sets the minimum value of this range. The value can be betweem
Number.MIN_VALUE
andNumber.MAX_VALUE
.Parameters:
Name Type Description minValue
Number Returns:
- Type
- void
-
toString()
-
Returns a string representation of this range.
Returns:
- Type
- String