Initial work of ESM transformation
This commit is contained in:
parent
2472c9cff2
commit
b8205a63aa
303 changed files with 1959 additions and 2450 deletions
10
font-src/support/util/mask-bit.mjs
Normal file
10
font-src/support/util/mask-bit.mjs
Normal file
|
@ -0,0 +1,10 @@
|
|||
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 const popCountByte = function (x) {
|
||||
return pcNibbleLookup[x & 0x0f] + pcNibbleLookup[(x >>> 4) & 0x0f];
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue