UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

24 lines (21 loc) 579 B
import { assert } from "../../../../../core/assert.js"; /** * * @param {number} mip * @param {number} x * @param {number} y * @returns {number} */ export function compose_finger_print(mip, x, y) { // validate assert.isNonNegativeInteger(x, 'x'); assert.isNonNegativeInteger(y, 'y'); assert.isNonNegativeInteger(mip, 'mip'); assert.lessThan(mip,32,'mip level is too high') assert.lessThan(x, (1 << mip), 'x'); assert.lessThan(y, (1 << mip), 'y'); return (mip << 24) | (x << 16) | (y << 8) ; }