diff --git a/src/math/TransformXY.js b/src/math/TransformXY.js index 748c5bfb9..496ae49a8 100644 --- a/src/math/TransformXY.js +++ b/src/math/TransformXY.js @@ -20,9 +20,9 @@ var Vector2 = require('./Vector2'); * @param {number} rotation - Rotation of the transform point, in radians. * @param {number} scaleX - Horizontal scale of the transform point. * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Vector2|Point|object)} [output] - [description] + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - [description] * - * @return {(Vector2|Point|object)} The translated point. + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. */ var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) { diff --git a/src/math/Vector2.js b/src/math/Vector2.js index b98d09b03..527c2bbd8 100644 --- a/src/math/Vector2.js +++ b/src/math/Vector2.js @@ -9,6 +9,13 @@ var Class = require('../utils/Class'); +/** + * @typedef {object} Vector2Like + * + * @property {number} x - [description] + * @property {number} y - [description] + */ + /** * @classdesc * [description] @@ -35,6 +42,7 @@ var Vector2 = new Class({ * @default 0 * @since 3.0.0 */ + this.x = 0; /** * The y component of this Vector. @@ -44,6 +52,7 @@ var Vector2 = new Class({ * @default 0 * @since 3.0.0 */ + this.y = 0; if (typeof x === 'object') { @@ -78,7 +87,7 @@ var Vector2 = new Class({ * @method Phaser.Math.Vector2#copy * @since 3.0.0 * - * @param {(Phaser.Math.Vector2|object)} src - [description] + * @param {(Phaser.Math.Vector2|Vector2Like)} src - [description] * * @return {Phaser.Math.Vector2} This Vector2. */