Constructor
new FloatingPointRange(fromValue, toValue, step)
Create a new instance.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
fromValue |
number | The lowest inclusive value in range | |
toValue |
number | The highest inclusive value in range | |
step |
number | 1 | The internal unit size. |
- Source:
Methods
inRange(value) → {boolean}
Determine if a value is within this range.
A TypeError is thrown when value is not a number.
Parameters:
Name | Type | Description |
---|---|---|
value |
number | The number to check. |
- Source:
Returns:
- True if value satisfies the range; false otherwise.
- Type
- boolean
isValidType(parameterType) → {boolean}
Determine if a ParameterType is compatible.
Parameters:
Name | Type | Description |
---|---|---|
parameterType |
ParameterType | The parameter type to test. |
- Source:
Returns:
- True if parameterType is compatible; otherwise return false.
- Type
- boolean