Skip to content

Xotic750/to-uint-24-x

Repository files navigation

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

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)