mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Math typedefs
This commit is contained in:
parent
3938675d9f
commit
43b4aad96c
5 changed files with 26 additions and 17 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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({
|
||||
|
|
8
src/math/typedefs/SinCosTable.js
Normal file
8
src/math/typedefs/SinCosTable.js
Normal 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.
|
||||
*/
|
7
src/math/typedefs/Vector2Like.js
Normal file
7
src/math/typedefs/Vector2Like.js
Normal 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.
|
||||
*/
|
9
src/math/typedefs/index.js
Normal file
9
src/math/typedefs/index.js
Normal 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
|
||||
*/
|
Loading…
Reference in a new issue