arcade-physics
Version:
Use Arcade Physics without Phaser.
27 lines • 1.04 kB
JavaScript
;
/**
* @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"));
/**
* Check to see if the Ellipse contains the given Point object.
*
* @function Phaser.Geom.Ellipse.ContainsPoint
* @since 3.0.0
*
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.
* @param {(Phaser.Geom.Point|object)} point - The Point object to check if it's within the Circle or not.
*
* @return {boolean} True if the Point coordinates are within the circle, otherwise false.
*/
const ContainsPoint = (ellipse, point) => {
return (0, Contains_1.default)(ellipse, point.x, point.y);
};
exports.default = ContainsPoint;
//# sourceMappingURL=ContainsPoint.js.map