A collection of useful static methods to deal with numbers
Checks whether or not the current number is within a desired range. If the number is already within the range it is returned, otherwise the min or max value is returned depending on which side of the range is exceeded. Note that this method returns the constrained value but does not change the current number.
The number to check
The minimum number in the range
The maximum number in the range
The constrained value if outside the range, otherwise the current value
Validate that a value is numeric and convert it to a number if necessary. Returns the specified default value if it is not.
Ext.Number.from('1.23', 1); // returns 1.23 Ext.Number.from('abc', 1); // returns 1
The value to return if the original value is non-numeric
value, if numeric, defaultValue otherwise