Ext.data.JsonP.Ext_Number({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"
Files
A collection of useful static methods to deal with numbers
\nChecks whether or not the passed number is within a desired range. If the number is already within the\nrange it is returned, otherwise the min or max value is returned depending on which side of the range is\nexceeded. Note that this method returns the constrained value but does not change the current number.
\nThe number to check
\nThe minimum number in the range
\nThe maximum number in the range
\nThe constrained value if outside the range, otherwise the current value
\nValidate that a value is numeric and convert it to a number if necessary. Returns the specified default value if\nit is not.
\n\nExt.Number.from('1.23', 1); // returns 1.23\nExt.Number.from('abc', 1); // returns 1\n
\nvalue, if numeric, defaultValue otherwise
\nSnaps the passed number between stopping points based upon a passed increment value.
\n\nThe difference between this and snapInRange is that snapInRange uses the minValue\nwhen calculating snap points:
\n\nr = Ext.Number.snap(56, 2, 55, 65); // Returns 56 - snap points are zero based\n\nr = Ext.Number.snapInRange(56, 2, 55, 65); // Returns 57 - snap points are based from minValue\n
\nThe unsnapped value.
\nThe increment by which the value must move.
\nThe minimum value to which the returned value must be constrained. Overrides the increment.
\nThe maximum value to which the returned value must be constrained. Overrides the increment.
\nThe value of the nearest snap target.
\nSnaps the passed number between stopping points based upon a passed increment value.
\n\nThe difference between this and snap is that snap does not use the minValue\nwhen calculating snap points:
\n\nr = Ext.Number.snap(56, 2, 55, 65); // Returns 56 - snap points are zero based\n\nr = Ext.Number.snapInRange(56, 2, 55, 65); // Returns 57 - snap points are based from minValue\n
\nThe unsnapped value.
\nThe increment by which the value must move.
\nThe minimum value to which the returned value must be constrained.
\nDefaults to: 0
The maximum value to which the returned value must be constrained.
\nDefaults to: Infinity
The value of the nearest snap target.
\n