Skip to content

Commit 0f9bfc6

Browse files
committed
Documented Math.Distance, Math.Fuzzy and Math.Interpolation.
1 parent d6d9b69 commit 0f9bfc6

13 files changed

Lines changed: 64 additions & 64 deletions

src/math/distance/DistanceBetween.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
*/
66

77
/**
8-
* [description]
8+
* Calculate the distance between two sets of coordinates (points).
99
*
1010
* @function Phaser.Math.Distance.Between
1111
* @since 3.0.0
1212
*
13-
* @param {number} x1 - [description]
14-
* @param {number} y1 - [description]
15-
* @param {number} x2 - [description]
16-
* @param {number} y2 - [description]
13+
* @param {number} x1 - The x coordinate of the first point.
14+
* @param {number} y1 - The y coordinate of the first point.
15+
* @param {number} x2 - The x coordinate of the second point.
16+
* @param {number} y2 - The y coordinate of the second point.
1717
*
18-
* @return {number} [description]
18+
* @return {number} The distance between each point.
1919
*/
2020
var DistanceBetween = function (x1, y1, x2, y2)
2121
{

src/math/distance/DistancePower.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
*/
66

77
/**
8-
* [description]
8+
* Calculate the distance between two sets of coordinates (points) to the power of `pow`.
99
*
1010
* @function Phaser.Math.Distance.Power
1111
* @since 3.0.0
1212
*
13-
* @param {number} x1 - [description]
14-
* @param {number} y1 - [description]
15-
* @param {number} x2 - [description]
16-
* @param {number} y2 - [description]
17-
* @param {number} pow - [description]
13+
* @param {number} x1 - The x coordinate of the first point.
14+
* @param {number} y1 - The y coordinate of the first point.
15+
* @param {number} x2 - The x coordinate of the second point.
16+
* @param {number} y2 - The y coordinate of the second point.
17+
* @param {number} pow - The exponent.
1818
*
19-
* @return {number} [description]
19+
* @return {number} The distance between each point.
2020
*/
2121
var DistancePower = function (x1, y1, x2, y2, pow)
2222
{

src/math/distance/DistanceSquared.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
*/
66

77
/**
8-
* [description]
8+
* Calculate the distance between two sets of coordinates (points), squared.
99
*
1010
* @function Phaser.Math.Distance.Squared
1111
* @since 3.0.0
1212
*
13-
* @param {number} x1 - [description]
14-
* @param {number} y1 - [description]
15-
* @param {number} x2 - [description]
16-
* @param {number} y2 - [description]
13+
* @param {number} x1 - The x coordinate of the first point.
14+
* @param {number} y1 - The y coordinate of the first point.
15+
* @param {number} x2 - The x coordinate of the second point.
16+
* @param {number} y2 - The y coordinate of the second point.
1717
*
18-
* @return {number} [description]
18+
* @return {number} The distance between each point, squared.
1919
*/
2020
var DistanceSquared = function (x1, y1, x2, y2)
2121
{

src/math/fuzzy/Ceil.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66

77
/**
8-
* [description]
8+
* Calculate the ceiling of the given value.
99
*
1010
* @function Phaser.Math.Fuzzy.Ceil
1111
* @since 3.0.0
1212
*
13-
* @param {number} value - [description]
14-
* @param {float} [epsilon=0.0001] - [description]
13+
* @param {number} value - The value.
14+
* @param {float} [epsilon=0.0001] - The epsilon.
1515
*
16-
* @return {number} [description]
16+
* @return {number} The ceiling of the value.
1717
*/
1818
var Ceil = function (value, epsilon)
1919
{

src/math/fuzzy/Equal.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
*/
66

77
/**
8-
* [description]
8+
* Check whether the given values are equal.
99
*
1010
* @function Phaser.Math.Fuzzy.Equal
1111
* @since 3.0.0
1212
*
13-
* @param {number} a - [description]
14-
* @param {number} b - [description]
15-
* @param {float} [epsilon=0.0001] - [description]
13+
* @param {number} a - The first value.
14+
* @param {number} b - The second value.
15+
* @param {float} [epsilon=0.0001] - The epsilon.
1616
*
17-
* @return {boolean} [description]
17+
* @return {boolean} Whether the given values are equal.
1818
*/
1919
var Equal = function (a, b, epsilon)
2020
{

src/math/fuzzy/Floor.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66

77
/**
8-
* [description]
8+
* Calculate the floor of the given value.
99
*
1010
* @function Phaser.Math.Fuzzy.Floor
1111
* @since 3.0.0
1212
*
13-
* @param {number} value - [description]
14-
* @param {float} [epsilon=0.0001] - [description]
13+
* @param {number} value - The value.
14+
* @param {float} [epsilon=0.0001] - The epsilon.
1515
*
16-
* @return {number} [description]
16+
* @return {number} The floor of the value.
1717
*/
1818
var Floor = function (value, epsilon)
1919
{

src/math/fuzzy/GreaterThan.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
*/
66

77
/**
8-
* [description]
8+
* Check whether `a` is greater than `b`.
99
*
1010
* @function Phaser.Math.Fuzzy.GreaterThan
1111
* @since 3.0.0
1212
*
13-
* @param {number} a - [description]
14-
* @param {number} b - [description]
15-
* @param {float} [epsilon=0.0001] - [description]
13+
* @param {number} a - The first value.
14+
* @param {number} b - The second value.
15+
* @param {float} [epsilon=0.0001] - The epsilon.
1616
*
17-
* @return {boolean} [description]
17+
* @return {boolean} Whether `a` is greater than `b`.
1818
*/
1919
var GreaterThan = function (a, b, epsilon)
2020
{

src/math/fuzzy/LessThan.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
*/
66

77
/**
8-
* [description]
8+
* Check whether `a` is less than `b`.
99
*
1010
* @function Phaser.Math.Fuzzy.LessThan
1111
* @since 3.0.0
1212
*
13-
* @param {number} a - [description]
14-
* @param {number} b - [description]
15-
* @param {float} [epsilon=0.0001] - [description]
13+
* @param {number} a - The first value.
14+
* @param {number} b - The second value.
15+
* @param {float} [epsilon=0.0001] - The epsilon.
1616
*
17-
* @return {boolean} [description]
17+
* @return {boolean} Whether `a` is less than `b`.
1818
*/
1919
var LessThan = function (a, b, epsilon)
2020
{

src/math/interpolation/BezierInterpolation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
var Bernstein = require('../Bernstein');
88

99
/**
10-
* [description]
10+
* A bezier interpolation method.
1111
*
1212
* @function Phaser.Math.Interpolation.Bezier
1313
* @since 3.0.0
1414
*
15-
* @param {number} v - [description]
16-
* @param {number} k - [description]
15+
* @param {number[]} v - The input array of values to interpolate between.
16+
* @param {number} k - The percentage of interpolation, between 0 and 1.
1717
*
18-
* @return {number} [description]
18+
* @return {number} The interpolated value.
1919
*/
2020
var BezierInterpolation = function (v, k)
2121
{

src/math/interpolation/CatmullRomInterpolation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
var CatmullRom = require('../CatmullRom');
88

99
/**
10-
* [description]
10+
* A Catmull-Rom interpolation method.
1111
*
1212
* @function Phaser.Math.Interpolation.CatmullRom
1313
* @since 3.0.0
1414
*
15-
* @param {number} v - [description]
16-
* @param {number} k - [description]
15+
* @param {number[]} v - The input array of values to interpolate between.
16+
* @param {number} k - The percentage of interpolation, between 0 and 1.
1717
*
18-
* @return {number} [description]
18+
* @return {number} The interpolated value.
1919
*/
2020
var CatmullRomInterpolation = function (v, k)
2121
{

0 commit comments

Comments
 (0)