Skip to content

Commit 8b7e64c

Browse files
authored
Merge pull request phaserjs#3495 from icbat/jsdoc-lerp-and-linear
Jsdoc lerp and linear
2 parents afb0765 + 6d7b28d commit 8b7e64c

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/math/Linear.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+
* Calculates a linear (interpolation) value over t.
99
*
1010
* @function Phaser.Math.Linear
1111
* @since 3.0.0
1212
*
13-
* @param {number} p0 - [description]
14-
* @param {number} p1 - [description]
15-
* @param {float} t - [description]
13+
* @param {number} p0 - The first point
14+
* @param {number} p1 - The second point
15+
* @param {float} t -The percentage between p0 and p1 to return represented as a number between 0 and 1.
1616
*
17-
* @return {number} [description]
17+
* @return {number} The step t% of the way between p0 and p1
1818
*/
1919
var Linear = function (p0, p1, t)
2020
{

src/math/interpolation/LinearInterpolation.js

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

99
/**
10-
* [description]
10+
* A Linear Interpolation Method.
1111
*
1212
* @function Phaser.Math.Interpolation.Linear
1313
* @since 3.0.0
14+
* @see https://en.wikipedia.org/wiki/Linear_interpolation
1415
*
15-
* @param {float} v - [description]
16-
* @param {number} k - [description]
16+
* @param {number[]} v - The input array of values to interpolate between.
17+
* @param {!number} k - The percentage of interploation, between 0 and 1.
1718
*
18-
* @return {number} [description]
19+
* @return {!number} The interpolated value.
1920
*/
2021
var LinearInterpolation = function (v, k)
2122
{

0 commit comments

Comments
 (0)