UNPKG

@phaserjs/phaser

Version:
9 lines (8 loc) 338 B
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ export function GetRectangleOverlap(rectA, rectB) { return rectA.x < rectB.right && rectA.right > rectB.x && rectA.y < rectB.bottom && rectA.bottom > rectB.y; }