to-uint-24-x
v4.1.2
Published
Converts a value to Uint24.
Downloads
38
Maintainers
Readme
to-uint-24-x
Converts a value to Uint24.
module.exports(argument) ⇒ number ⏏
The abstract operation ToUint24 converts argument to one of 2^24 integer values in the range 0 through 2^24-1, inclusive.
Kind: Exported function
Returns: number - Integer value, 0 through 2^24-1, inclusive.
| Param | Type | Description | | -------- | ------------------- | ------------------------------------------------ | | argument | number | The argument to convert to one of 2^24 integers. |
Example
import toUint24 from 'to-uint-24-x';
console.log(toUint24(1)); // 1
console.log(toUint24(-1)); // 16777215 (2^24-1)