@thi.ng/binary
Version:
100+ assorted binary / bitwise operations, conversions, utilities, lookup tables
14 lines • 432 B
TypeScript
import type { Pow2 } from "./api.js";
/**
* Aligns `addr` to next multiple of `size`. The latter must be a power
* of 2.
*
* @param addr - value to align
* @param size - alignment value
*/
export declare const align: (addr: number, size: Pow2) => number;
/**
* Returns true if `addr` is aligned to wordsize `size`.
*/
export declare const isAligned: (addr: number, size: Pow2) => boolean;
//# sourceMappingURL=align.d.ts.map