arcade-physics
Version:
Use Arcade Physics without Phaser.
18 lines • 1.25 kB
TypeScript
export default Interpolate;
/**
* Returns the linear interpolation point between the two given points, based on `t`.
*
* @function Phaser.Geom.Point.Interpolate
* @since 3.0.0
*
* @generic {Phaser.Geom.Point} O - [out,$return]
*
* @param {Phaser.Geom.Point} pointA - The starting `Point` for the interpolation.
* @param {Phaser.Geom.Point} pointB - The target `Point` for the interpolation.
* @param {number} [t=0] - The amount to interpolate between the two points. Generally, a value between 0 (returns the starting `Point`) and 1 (returns the target `Point`). If omitted, 0 is used.
* @param {(Phaser.Geom.Point|object)} [out] - An optional `Point` object whose `x` and `y` values will be set to the result of the interpolation (can also be any object with `x` and `y` properties). If omitted, a new `Point` created and returned.
*
* @return {(Phaser.Geom.Point|object)} Either the object from the `out` argument with the properties `x` and `y` set to the result of the interpolation or a newly created `Point` object.
*/
declare function Interpolate(pointA: Phaser.Geom.Point, pointB: Phaser.Geom.Point, t?: number | undefined, out?: (Phaser.Geom.Point | object)): (Phaser.Geom.Point | object);
//# sourceMappingURL=Interpolate.d.ts.map