From 7153548c36e426043682ece1e7b2465c0f5ec42c Mon Sep 17 00:00:00 2001 From: Evan Cobb Date: Mon, 2 Apr 2018 10:54:46 -0500 Subject: [PATCH 1/2] Update LinearInterpolation.js --- src/math/interpolation/LinearInterpolation.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/math/interpolation/LinearInterpolation.js b/src/math/interpolation/LinearInterpolation.js index c2533a5b1..f0a19bcb4 100644 --- a/src/math/interpolation/LinearInterpolation.js +++ b/src/math/interpolation/LinearInterpolation.js @@ -7,15 +7,16 @@ var Linear = require('../Linear'); /** - * [description] + * A Linear Interpolation Method. * * @function Phaser.Math.Interpolation.Linear * @since 3.0.0 + * @see https://en.wikipedia.org/wiki/Linear_interpolation * - * @param {float} v - [description] - * @param {number} k - [description] + * @param {number[]} v - The input array of values to interpolate between. + * @param {!number} k - The percentage of interploation, between 0 and 1. * - * @return {number} [description] + * @return {!number} The interpolated value. */ var LinearInterpolation = function (v, k) { From 6d7b28db04dfc56a04c9e65ec822e50197ee82b5 Mon Sep 17 00:00:00 2001 From: Evan Cobb Date: Mon, 2 Apr 2018 11:03:23 -0500 Subject: [PATCH 2/2] Fleshing out docs --- src/math/Linear.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/math/Linear.js b/src/math/Linear.js index cf91307f4..aa085e8f9 100644 --- a/src/math/Linear.js +++ b/src/math/Linear.js @@ -5,16 +5,16 @@ */ /** - * [description] + * Calculates a linear (interpolation) value over t. * * @function Phaser.Math.Linear * @since 3.0.0 * - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {float} t - [description] + * @param {number} p0 - The first point + * @param {number} p1 - The second point + * @param {float} t -The percentage between p0 and p1 to return represented as a number between 0 and 1. * - * @return {number} [description] + * @return {number} The step t% of the way between p0 and p1 */ var Linear = function (p0, p1, t) {