Installation
npm install --save @types/popcnt32
Summary
This package contains type definitions for popcnt32 (https://github.com/emilbayes/popcnt32#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/popcnt32.
index.d.ts
export = popcnt32;
/**
* Calculate population count (popcnt) on a 32-bit number, branch free.
*
* @return Number of 1-bits in `int`. Int is implicitly cast to a 32-bit unsigned int.
* This means `popcnt32(-1) === 32` while `popcnt32(1) === 1`.
*
* @example
* import popcnt32 = require('popcnt32')
*
* popcnt32(0b1) // 1
* popcnt32(0b1000001) // 2
*/
declare function popcnt32(int: number): number;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by BendingBender.