UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

12 lines (10 loc) 298 B
import { assert } from "../assert.js"; /** * Align to the nearest number divisible by 32, rounding up * @param {number} x must be a non-negative integer * @returns {number} */ export function align_32(x) { assert.isNonNegativeInteger(x, 'n'); return ((x + 31) >>> 5) << 5 }