UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

24 lines (22 loc) 483 B
/** * * @param {number} bounds_x0 * @param {number} bounds_y0 * @param {number} bounds_x1 * @param {number} bounds_y1 * @param {number} x0 * @param {number} y0 * @param {number} x1 * @param {number} y1 * @return {boolean} */ export function aabb2_contains( bounds_x0, bounds_y0, bounds_x1, bounds_y1, x0, y0, x1, y1 ) { return x0 >= bounds_x0 && x1 <= bounds_x1 && y0 >= bounds_y0 && y1 <= bounds_y1 ; }