2018-02-12 16:01:20 +00:00
|
|
|
/**
|
2024-02-19 17:12:18 +00:00
|
|
|
* @author Richard Davey <rich@phaser.io>
|
|
|
|
* @copyright 2013-2024 Phaser Studio Inc.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
2017-10-13 13:11:54 +00:00
|
|
|
/**
|
2018-01-26 04:53:16 +00:00
|
|
|
* Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.
|
|
|
|
* Returns `true` if they all match, otherwise returns `false`.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Ellipse.Equals
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @param {Phaser.Geom.Ellipse} ellipse - The first Ellipse to compare.
|
|
|
|
* @param {Phaser.Geom.Ellipse} toCompare - The second Ellipse to compare.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @return {boolean} `true` if the two Ellipse equal each other, otherwise `false`.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-01-02 00:47:16 +00:00
|
|
|
var Equals = function (ellipse, toCompare)
|
|
|
|
{
|
|
|
|
return (
|
|
|
|
ellipse.x === toCompare.x &&
|
|
|
|
ellipse.y === toCompare.y &&
|
|
|
|
ellipse.width === toCompare.width &&
|
|
|
|
ellipse.height === toCompare.height
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Equals;
|