File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * @author Richard Davey <rich@photonstorm.com>
3+ * @copyright 2018 Photon Storm Ltd.
4+ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License }
5+ */
6+
7+ /**
8+ * Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.
9+ *
10+ * @function Phaser.Geom.Rectangle.SameDimensions
11+ * @since 3.15.0
12+ *
13+ * @param {Phaser.Geom.Rectangle } rect - The first Rectangle object.
14+ * @param {Phaser.Geom.Rectangle } toCompare - The second Rectangle object.
15+ *
16+ * @return {boolean } `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.
17+ */
18+ var SameDimensions = function ( rect , toCompare )
19+ {
20+ return ( rect . width === toCompare . width && rect . height === toCompare . height ) ;
21+ } ;
22+
23+ module . exports = SameDimensions ;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ Rectangle.Perimeter = require('./Perimeter');
4040Rectangle . PerimeterPoint = require ( './PerimeterPoint' ) ;
4141Rectangle . Random = require ( './Random' ) ;
4242Rectangle . RandomOutside = require ( './RandomOutside' ) ;
43+ Rectangle . SameDimensions = require ( './SameDimensions' ) ;
4344Rectangle . Scale = require ( './Scale' ) ;
4445Rectangle . Union = require ( './Union' ) ;
4546
You can’t perform that action at this time.
0 commit comments