Skip to content
/ uint Public

🔢 Unsigned integer module from Glize library.

License

Notifications You must be signed in to change notification settings

Datamart/uint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unsigned Integer Tweet

Build Status License NPM version Website NPM downloads

Unsigned integer module from Glize library.

Usage

npm install uint --save
import {uint8, uint16, uint32} from 'uint';

/**
 * Converts given <code>number</code> to unsigned int8.
 * @param {number} number The number to be converted.
 * @return {number} The unsigned (zero or positive) number.
 */
console.log(uint8(0)); // 0
console.log(uint8(1)); // 1
console.log(uint8(255)); // 255
console.log(uint8(256)); // NaN
console.log(uint8(-256)); // NaN
console.log(uint8(-1)); // NaN

console.log(uint16(0)); // 0
console.log(uint16(1)); // 1
console.log(uint16(65535)); // 65535
console.log(uint16(65536)); // NaN
console.log(uint16(-65536)); // NaN
console.log(uint16(-1)); // NaN

console.log(uint32(0)); // 0
console.log(uint32(1)); // 1
console.log(uint32(4294967295)); // 4294967295
console.log(uint32(4294967296)); // NaN
console.log(uint32(-4294967296)); // NaN
console.log(uint32(-1)); // NaN

For more information please visit Glize project page.