UNPKG

arcade-physics

Version:
27 lines 1.13 kB
"use strict"; /** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Contains_1 = __importDefault(require("./Contains")); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. * * @function Phaser.Geom.Rectangle.ContainsPoint * @since 3.0.0 * * @param {Phaser.Geom.Rectangle} rect - The Rectangle object. * @param {Phaser.Geom.Point} point - The point object to be checked. Can be a Phaser Point object or any object with x and y values. * * @return {boolean} A value of true if the Rectangle object contains the specified point, otherwise false. */ const ContainsPoint = (rect, point) => { return (0, Contains_1.default)(rect, point.x, point.y); }; exports.default = ContainsPoint; //# sourceMappingURL=ContainsPoint.js.map