mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 00:53:42 +00:00
32 lines
667 B
JavaScript
32 lines
667 B
JavaScript
/**
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
* @copyright 2018 Photon Storm Ltd.
|
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
|
*/
|
|
|
|
/**
|
|
* [description]
|
|
*
|
|
* @function Phaser.Geom.Line.Offset
|
|
* @since 3.0.0
|
|
*
|
|
* @generic {Phaser.Geom.Line} O - [line,$return]
|
|
*
|
|
* @param {Phaser.Geom.Line} line - [description]
|
|
* @param {number} x - [description]
|
|
* @param {number} y - [description]
|
|
*
|
|
* @return {Phaser.Geom.Line} [description]
|
|
*/
|
|
var Offset = function (line, x, y)
|
|
{
|
|
line.x1 += x;
|
|
line.y1 += y;
|
|
|
|
line.x2 += x;
|
|
line.y2 += y;
|
|
|
|
return line;
|
|
};
|
|
|
|
module.exports = Offset;
|