mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
10 lines
589 B
TypeScript
10 lines
589 B
TypeScript
/**
|
|
* Using Bresenham's line algorithm this will return an array of all coordinates on this line.
|
|
* The start and end points are rounded before this runs as the algorithm works on integers.
|
|
*
|
|
* @method Phaser.Line#coordinatesOnLine
|
|
* @param {number} [stepRate=1] - How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc.
|
|
* @param {array} [results] - The array to store the results in. If not provided a new one will be generated.
|
|
* @return {array} An array of coordinates.
|
|
*/
|
|
export default function (line: any, stepRate: any, results: any): any;
|