Retrieves and clamps a numerical value from an object.
name | type | description |
---|---|---|
source | object |
The object to retrieve the value from. |
key | string |
The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot ( |
min | number |
The minimum value which can be returned. |
max | number |
The maximum value which can be returned. |
defaultValue | number |
The value to return if the property doesn't exist. It's also constrained to the given bounds. |
The clamped value from the source
object.