Prototypes: Number
| Method Attributes | Method Name and Description |
|---|---|
|
setInRange(from, to)
Checks if a number is contained in the specified range, and adjusts it to the range limits.
|
Method Detail
{Number}
setInRange(from, to)
Checks if a number is contained in the specified range, and adjusts it to the range limits.
var myNumber = 20;
myNumber.setInRange(1,15); //returns 15;
myNumber.setInRange(30,50); //returns 30;
- Returns:
- {Number}
- See:
- liberty - Basic JavaScript Library 0.1