Math typedefs

This commit is contained in:
Richard Davey 2019-02-13 14:20:51 +00:00
parent 3938675d9f
commit 43b4aad96c
5 changed files with 26 additions and 17 deletions

View file

@ -4,14 +4,6 @@
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @typedef {object} SinCosTable
*
* @property {number} sin - The sine value.
* @property {number} cos - The cosine value.
* @property {number} length - The length.
*/
/**
* Generate a series of sine and cosine values.
*
@ -23,7 +15,7 @@
* @param {number} [cosAmp=1] - The cosine value amplitude.
* @param {number} [frequency=1] - The frequency of the values.
*
* @return {SinCosTable} The generated values.
* @return {Phaser.Math.Types.SinCosTable} The generated values.
*/
var SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)
{

View file

@ -9,13 +9,6 @@
var Class = require('../utils/Class');
/**
* @typedef {object} Vector2Like
*
* @property {number} x - The x component.
* @property {number} y - The y component.
*/
/**
* @classdesc
* A representation of a vector in 2D space.
@ -27,7 +20,7 @@ var Class = require('../utils/Class');
* @constructor
* @since 3.0.0
*
* @param {number|Vector2Like} [x] - The x component, or an object with `x` and `y` properties.
* @param {number|Phaser.Math.Types.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.
* @param {number} [y] - The y component.
*/
var Vector2 = new Class({

View file

@ -0,0 +1,8 @@
/**
* @typedef {object} Phaser.Math.Types.SinCosTable
* @since 3.0.0
*
* @property {number} sin - The sine value.
* @property {number} cos - The cosine value.
* @property {number} length - The length.
*/

View file

@ -0,0 +1,7 @@
/**
* @typedef {object} Phaser.Math.Types.Vector2Like
* @since 3.0.0
*
* @property {number} x - The x component.
* @property {number} y - The y component.
*/

View file

@ -0,0 +1,9 @@
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* @namespace Phaser.Math.Types
*/