Skip to content

Commit a40b605

Browse files
committed
Added jsdocs
1 parent e33bf4f commit a40b605

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/geom/rectangle/FitInside.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66

77
var GetAspectRatio = require('./GetAspectRatio');
88

9-
// Fits the target rectangle into the source rectangle.
10-
// Preserves aspect ratio.
11-
// Scales and centers the target rectangle to the source rectangle
12-
139
/**
14-
* [description]
10+
* Adjusts the target rectangle, changing its width, height and position,
11+
* so that it fits inside the area of the source rectangle, while maintaining its original
12+
* aspect ratio.
13+
*
14+
* Unlike the `FitOutside` function, there may be some space inside the source area not covered.
1515
*
1616
* @function Phaser.Geom.Rectangle.FitInside
1717
* @since 3.0.0
1818
*
1919
* @generic {Phaser.Geom.Rectangle} O - [target,$return]
2020
*
21-
* @param {Phaser.Geom.Rectangle} target - [description]
22-
* @param {Phaser.Geom.Rectangle} source - [description]
21+
* @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.
22+
* @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.
2323
*
24-
* @return {Phaser.Geom.Rectangle} [description]
24+
* @return {Phaser.Geom.Rectangle} The modified target rectangle instance.
2525
*/
2626
var FitInside = function (target, source)
2727
{

src/geom/rectangle/FitOutside.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66

77
var GetAspectRatio = require('./GetAspectRatio');
88

9-
// Fits the target rectangle around the source rectangle.
10-
// Preserves aspect ration.
11-
// Scales and centers the target rectangle to the source rectangle
12-
139
/**
14-
* [description]
10+
* Adjusts the target rectangle, changing its width, height and position,
11+
* so that it fully covers the area of the source rectangle, while maintaining its original
12+
* aspect ratio.
13+
*
14+
* Unlike the `FitInside` function, the target rectangle may extend further out than the source.
1515
*
1616
* @function Phaser.Geom.Rectangle.FitOutside
1717
* @since 3.0.0
1818
*
1919
* @generic {Phaser.Geom.Rectangle} O - [target,$return]
2020
*
21-
* @param {Phaser.Geom.Rectangle} target - [description]
22-
* @param {Phaser.Geom.Rectangle} source - [description]
21+
* @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.
22+
* @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.
2323
*
24-
* @return {Phaser.Geom.Rectangle} [description]
24+
* @return {Phaser.Geom.Rectangle} The modified target rectangle instance.
2525
*/
2626
var FitOutside = function (target, source)
2727
{

0 commit comments

Comments
 (0)