mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Merge pull request #3495 from icbat/jsdoc-lerp-and-linear
Jsdoc lerp and linear
This commit is contained in:
commit
8b7e64cb4a
2 changed files with 10 additions and 9 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue