Documented a few more Phaser.Math functions.

This commit is contained in:
Chris Andrew 2018-05-24 12:59:27 +01:00
parent c9d82c9ebd
commit 1c94c3d4d6
4 changed files with 19 additions and 15 deletions

View file

@ -5,7 +5,7 @@
*/
/**
* [description]
* Calculates a Catmull-Rom value.
*
* @function Phaser.Math.CatmullRom
* @since 3.0.0
@ -16,7 +16,7 @@
* @param {number} p2 - [description]
* @param {number} p3 - [description]
*
* @return {number} [description]
* @return {number} The Catmull-Rom value.
*/
var CatmullRom = function (t, p0, p1, p2, p3)
{

View file

@ -5,16 +5,18 @@
*/
/**
* [description]
* Ceils to some place comparative to a `base`, default is 10 for decimal place.
*
* The `place` is represented by the power applied to `base` to get that place.
*
* @function Phaser.Math.CeilTo
* @since 3.0.0
*
* @param {number} value - [description]
* @param {number} [place=0] - [description]
* @param {integer} [base=10] - [description]
* @param {number} value - The value to round.
* @param {number} [place=0] - The place to round to.
* @param {integer} [base=10] - The base to round in. Default is 10 for decimal.
*
* @return {number} [description]
* @return {number} The rounded value.
*/
var CeilTo = function (value, place, base)
{

View file

@ -5,16 +5,18 @@
*/
/**
* [description]
* Floors to some place comparative to a `base`, default is 10 for decimal place.
*
* The `place` is represented by the power applied to `base` to get that place.
*
* @function Phaser.Math.FloorTo
* @since 3.0.0
*
* @param {number} value - [description]
* @param {integer} [place=0 - [description]
* @param {integer} [base=10] - [description]
* @param {number} value - The value to round.
* @param {integer} [place=0] - The place to round to.
* @param {integer} [base=10] - The base to round in. Default is 10 for decimal.
*
* @return {number} [description]
* @return {number} The rounded value.
*/
var FloorTo = function (value, place, base)
{

View file

@ -10,9 +10,9 @@
* @function Phaser.Math.RoundTo
* @since 3.0.0
*
* @param {number} value - The value to be rounded.
* @param {integer} [place=0] - The decimal place to round to.
* @param {integer} [base=10] - [description]
* @param {number} value - The value to round.
* @param {integer} [place=0] - The place to round to.
* @param {integer} [base=10] - The base to round in. Default is 10 for decimal.
*
* @return {number} The rounded value.
*/