* Add Characters
- LATIN CAPITAL LETTER AA (`U+A732`). - LATIN SMALL LETTER AA (`U+A733`). - LATIN CAPITAL LETTER AO (`U+A734`) (#1623).
This commit is contained in:
parent
011e5fb39b
commit
07d49ce68b
10 changed files with 268 additions and 88 deletions
|
@ -1,10 +1,16 @@
|
|||
const pcNibbleLookup = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4];
|
||||
export function maskBit(x, y) {
|
||||
return x & (1 << y);
|
||||
}
|
||||
export function maskBits(x, y) {
|
||||
return x & y;
|
||||
}
|
||||
export function bitOr(...xs) {
|
||||
let x = 0;
|
||||
for (const a of xs) x |= a;
|
||||
return x;
|
||||
}
|
||||
|
||||
const pcNibbleLookup = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4];
|
||||
export function popCountByte(x) {
|
||||
return pcNibbleLookup[x & 0x0f] + pcNibbleLookup[(x >>> 4) & 0x0f];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue