Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> Linear(p0, p1, t)

Description:

Calculates a linear (interpolation) value over t.

Parameters:

name type description
p0 number

The first point.

p1 number

The second point.

t number

The percentage between p0 and p1 to return, represented as a number between 0 and 1.

Returns:
Description:

The step t% of the way between p0 and p1.

Type:
  • number
Since: 3.0.0
Source: src/math/Linear.js (Line 7)