* Returns UInt64 representing the given value, provided that it is a finite number. Otherwise, zero is returned. * @param {number} value 32-bit integer value * @returns {!UInt64} The corresponding UInt64 value
(value)
| 1051 | * @returns {!UInt64} The corresponding UInt64 value |
| 1052 | */ |
| 1053 | static fromNumber (value) { |
| 1054 | if (isNaN(value)) { |
| 1055 | return UINT64_ZERO |
| 1056 | } |
| 1057 | if (value < 0) { |
| 1058 | return UINT64_ZERO |
| 1059 | } |
| 1060 | if (value >= UINT64_TWO_PWR_64_DBL) { |
| 1061 | return UINT64_MAX |
| 1062 | } |
| 1063 | if (value < 0) { |
| 1064 | return UInt64.fromNumber(-value).neg() |
| 1065 | } |
| 1066 | return UInt64.fromBits((value % UINT64_TWO_PWR_32_DBL) | 0, (value / UINT64_TWO_PWR_32_DBL) | 0) |
| 1067 | } |
| 1068 | |
| 1069 | /** |
| 1070 | * Returns UInt64 representation of the given string, written using the specified radix. |
nothing calls this directly
no test coverage detected