@types/popcnt32
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/popcnt32

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.37 kB

Total Files

5

Last publish

Collaborators

  • types