2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2022-02-28 14:29:51 +00:00
|
|
|
* @copyright 2022 Photon Storm Ltd.
|
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-06-21 17:13:46 +00:00
|
|
|
* Compare two lines for strict equality.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Line.Equals
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-06-21 17:13:46 +00:00
|
|
|
* @param {Phaser.Geom.Line} line - The first line to compare.
|
|
|
|
* @param {Phaser.Geom.Line} toCompare - The second line to compare.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-06-21 17:13:46 +00:00
|
|
|
* @return {boolean} Whether the two lines are equal.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-01-05 00:20:11 +00:00
|
|
|
var Equals = function (line, toCompare)
|
|
|
|
{
|
|
|
|
return (
|
|
|
|
line.x1 === toCompare.x1 &&
|
|
|
|
line.y1 === toCompare.y1 &&
|
|
|
|
line.x2 === toCompare.x2 &&
|
|
|
|
line.y2 === toCompare.y2
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Equals;
|