| Package | org.granite.util |
| Class | public class NumberUtil |
Numbers.
| Method | Defined by | ||
|---|---|---|---|
|
getFractionPartLength(number:Number):int
[static]
Returns the length of the fraction part of the number paremeter, if it
was written in base 10 without any exponent.
| NumberUtil | ||
|
getIntegerFractionLengths(number:Number):Array
[static]
Returns an array of two
int values that represents the lengths of the
integer and fraction parts of the number paremeter, if it was written in base 10
without any exponent. | NumberUtil | ||
|
getIntegerPartLength(number:Number):int
[static]
Returns the length of the integer part of the number paremeter, if it
was written in base 10 without any exponent.
| NumberUtil | ||
| getFractionPartLength | () | method |
public static function getFractionPartLength(number:Number):intReturns the length of the fraction part of the number paremeter, if it was written in base 10 without any exponent.
Note: this method seems to be only reliable with numbers between -9999999999999998 and +9999999999999998 (inclusive), made from no more than 16 significants digits and with an optional dot anywhere (only empirical)...
Parametersnumber:Number — the number from wich to get fraction part length.
|
int — the fraction part length or -1 if the supplied number is NaN or infinite.
|
| getIntegerFractionLengths | () | method |
public static function getIntegerFractionLengths(number:Number):Array
Returns an array of two int values that represents the lengths of the
integer and fraction parts of the number paremeter, if it was written in base 10
without any exponent.
Note: this method seems to be only reliable with numbers between -9999999999999998 and +9999999999999998 (inclusive), made from no more than 16 significants digits and with an optional dot anywhere (only empirical)...
Parametersnumber:Number — the number from wich to get integer and the fraction part lengths.
|
Array — an array that contains the integer and the fraction parts lengths or [-1, -1]
if the supplied number is NaN or infinite.
|
| getIntegerPartLength | () | method |
public static function getIntegerPartLength(number:Number):intReturns the length of the integer part of the number paremeter, if it was written in base 10 without any exponent.
Note: this method seems to be only reliable with numbers between -9999999999999998 and +9999999999999998 (inclusive), made from no more than 16 significants digits and with an optional dot anywhere (only empirical)...
Parametersnumber:Number — the number from wich to get interger part length.
|
int — the integer part length or -1 if the supplied number is NaN or infinite.
|