Skip to content

Commit 2c4f0d0

Browse files
committed
Added missing jsdocs for phaserjs#3996
1 parent ec412b2 commit 2c4f0d0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/geom/polygon/Polygon.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,19 @@ var Polygon = new Class({
174174
return this.area;
175175
},
176176

177+
/**
178+
* Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,
179+
* based on the given quantity or stepRate values.
180+
*
181+
* @method Phaser.Geom.Polygon#getPoints
182+
* @since 3.12.0
183+
*
184+
* @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.
185+
* @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.
186+
* @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.
187+
*
188+
* @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.
189+
*/
177190
getPoints: function (quantity, step, output)
178191
{
179192
return GetPoints(this, quantity, step, output);

0 commit comments

Comments
 (0)