2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2020-01-15 12:07:09 +00:00
|
|
|
* @copyright 2020 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
2017-10-13 13:11:54 +00:00
|
|
|
/**
|
2018-01-26 04:53:16 +00:00
|
|
|
* Offsets the Ellipse by the values given in the `x` and `y` properties of the Point object.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Ellipse.OffsetPoint
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-03-27 13:27:08 +00:00
|
|
|
* @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]
|
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)
|
2018-03-20 15:01:08 +00:00
|
|
|
* @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Ellipse by.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-01-26 04:53:16 +00:00
|
|
|
* @return {Phaser.Geom.Ellipse} The Ellipse that was offset.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-01-02 00:47:16 +00:00
|
|
|
var OffsetPoint = function (ellipse, point)
|
|
|
|
{
|
|
|
|
ellipse.x += point.x;
|
|
|
|
ellipse.y += point.y;
|
|
|
|
|
|
|
|
return ellipse;
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = OffsetPoint;
|