arcade-physics
Version:
Use Arcade Physics without Phaser.
23 lines • 942 B
JavaScript
;
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.
*
* @function Phaser.Geom.Rectangle.SameDimensions
* @since 3.15.0
*
* @param {Phaser.Geom.Rectangle} rect - The first Rectangle object.
* @param {Phaser.Geom.Rectangle} toCompare - The second Rectangle object.
*
* @return {boolean} `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.
*/
const SameDimensions = (rect, toCompare) => {
return rect.width === toCompare.width && rect.height === toCompare.height;
};
exports.default = SameDimensions;
//# sourceMappingURL=SameDimensions.js.map