1111* @constructor
1212* @param {number } x - The x coordinate of the top-left corner of the Rectangle.
1313* @param {number } y - The y coordinate of the top-left corner of the Rectangle.
14- * @param {number } width - The width of the Rectangle.
15- * @param {number } height - The height of the Rectangle.
14+ * @param {number } width - The width of the Rectangle. Should always be either zero or a positive value.
15+ * @param {number } height - The height of the Rectangle. Should always be either zero or a positive value.
1616* @return {Phaser.Rectangle } This Rectangle object.
1717*/
1818Phaser . Rectangle = function ( x , y , width , height ) {
@@ -33,12 +33,12 @@ Phaser.Rectangle = function (x, y, width, height) {
3333 this . y = y ;
3434
3535 /**
36- * @property {number } width - The width of the Rectangle.
36+ * @property {number } width - The width of the Rectangle. This value should never be set to a negative.
3737 */
3838 this . width = width ;
3939
4040 /**
41- * @property {number } height - The height of the Rectangle.
41+ * @property {number } height - The height of the Rectangle. This value should never be set to a negative.
4242 */
4343 this . height = height ;
4444
@@ -79,8 +79,8 @@ Phaser.Rectangle.prototype = {
7979 * @method Phaser.Rectangle#setTo
8080 * @param {number } x - The x coordinate of the top-left corner of the Rectangle.
8181 * @param {number } y - The y coordinate of the top-left corner of the Rectangle.
82- * @param {number } width - The width of the Rectangle in pixels .
83- * @param {number } height - The height of the Rectangle in pixels .
82+ * @param {number } width - The width of the Rectangle. Should always be either zero or a positive value .
83+ * @param {number } height - The height of the Rectangle. Should always be either zero or a positive value .
8484 * @return {Phaser.Rectangle } This Rectangle object
8585 */
8686 setTo : function ( x , y , width , height ) {
@@ -251,12 +251,13 @@ Phaser.Rectangle.prototype = {
251251 } ,
252252
253253 /**
254- * Determines whether the object specified intersects (overlaps) with the given values.
254+ * Determines whether the coordinates given intersects (overlaps) with this Rectangle.
255+ *
255256 * @method Phaser.Rectangle#intersectsRaw
256- * @param {number } left - Description .
257- * @param {number } right - Description .
258- * @param {number } top - Description .
259- * @param {number } bottomt - Description .
257+ * @param {number } left - The x coordinate of the left of the area .
258+ * @param {number } right - The right coordinate of the area .
259+ * @param {number } top - The y coordinate of the area .
260+ * @param {number } bottom - The bottom coordinate of the area .
260261 * @param {number } tolerance - A tolerance value to allow for an intersection test with padding, default to 0
261262 * @return {boolean } A value of true if the specified object intersects with the Rectangle; otherwise false.
262263 */
@@ -736,10 +737,10 @@ Phaser.Rectangle.intersects = function (a, b) {
736737/**
737738* Determines whether the object specified intersects (overlaps) with the given values.
738739* @method Phaser.Rectangle.intersectsRaw
739- * @param {number } left - Description .
740- * @param {number } right - Description .
741- * @param {number } top - Description .
742- * @param {number } bottom - Description .
740+ * @param {number } left - The x coordinate of the left of the area .
741+ * @param {number } right - The right coordinate of the area .
742+ * @param {number } top - The y coordinate of the area .
743+ * @param {number } bottom - The bottom coordinate of the area .
743744* @param {number } tolerance - A tolerance value to allow for an intersection test with padding, default to 0
744745* @return {boolean } A value of true if the specified object intersects with the Rectangle; otherwise false.
745746*/
0 commit comments