UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

11 lines (10 loc) • 324 B
function collidePointRect(point, rect) { return point.x >= rect.x && // right of the left edge AND point.x <= rect.x + rect.width && // left of the right edge AND point.y >= rect.y && // below the top AND point.y <= rect.y + rect.height; } export { collidePointRect }; //# sourceMappingURL=collidePointRect.js.map