Merge pull request #3495 from icbat/jsdoc-lerp-and-linear

Jsdoc lerp and linear
This commit is contained in:
Richard Davey 2018-04-03 13:54:14 +01:00 committed by GitHub
commit 8b7e64cb4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View file

@ -5,16 +5,16 @@
*/ */
/** /**
* [description] * Calculates a linear (interpolation) value over t.
* *
* @function Phaser.Math.Linear * @function Phaser.Math.Linear
* @since 3.0.0 * @since 3.0.0
* *
* @param {number} p0 - [description] * @param {number} p0 - The first point
* @param {number} p1 - [description] * @param {number} p1 - The second point
* @param {float} t - [description] * @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) var Linear = function (p0, p1, t)
{ {

View file

@ -7,15 +7,16 @@
var Linear = require('../Linear'); var Linear = require('../Linear');
/** /**
* [description] * A Linear Interpolation Method.
* *
* @function Phaser.Math.Interpolation.Linear * @function Phaser.Math.Interpolation.Linear
* @since 3.0.0 * @since 3.0.0
* @see https://en.wikipedia.org/wiki/Linear_interpolation
* *
* @param {float} v - [description] * @param {number[]} v - The input array of values to interpolate between.
* @param {number} k - [description] * @param {!number} k - The percentage of interploation, between 0 and 1.
* *
* @return {number} [description] * @return {!number} The interpolated value.
*/ */
var LinearInterpolation = function (v, k) var LinearInterpolation = function (v, k)
{ {