- Source:
- Author:
-
- Copyright:
- License:
Long Number mixin for ish.js
Methods
[mixin]
ish.type.is.numeric.large.cmp(sNumber, sRelativeTo) → {integer}
- Source:
Determines if the passed value is greater then, less then or equal to the passed relative value.
From Mixin: ish.type.is.numeric.large.js must be included for ishJS to access this functionality.
Parameters:
| Name |
Type |
Description |
sNumber |
string
|
Value representing the number to compare. |
sRelativeTo |
string
|
Value representing the relative number to compare to. |
Returns:
| Type |
Description |
|
integer
|
Value representing if the passed value is greater then (1), less then (-1) or equal to (0) the passed relative value with undefined indicating one of the passed values was non-numeric. |
[mixin]
ish.type.is.numeric.large.precision(sNumber) → {integer}
- Source:
Determines the numeric precision of the passed value.
From Mixin: ish.type.is.numeric.large.js must be included for ishJS to access this functionality.
Parameters:
| Name |
Type |
Description |
sNumber |
string
|
Value representing the number to compare. |
Returns:
| Type |
Description |
|
integer
|
Value representing the numeric precision of the passed value. |
[mixin]
ish.type.is.numeric.large.range(sNumber, sMin, sMax) → {boolean}
- Source:
Determines if the passed value is within the passed range.
From Mixin: ish.type.is.numeric.large.js must be included for ishJS to access this functionality.
Note: (sNumber >= sMin && sNumber <= sMax) would work for most numeric checks, but in the case of huge/tiny numbers (such as NUMERIC(x,y) in Oracle), the numbers would be too large/small to be represented in Javascript's numeric variables.
Parameters:
| Name |
Type |
Description |
sNumber |
string
|
Value representing the number to compare. |
sMin |
string
|
Value representing the minimum number. |
sMax |
string
|
Value representing the maximum number. |
Returns:
| Type |
Description |
|
boolean
|
Value representing if the passed value is within the passed range. |