mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 20:13:35 +00:00
27 lines
723 B
JavaScript
27 lines
723 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}
|
|
*/
|
|
|
|
/**
|
|
* Offsets the Circle by the values given.
|
|
*
|
|
* @function Phaser.Geom.Circle.Offset
|
|
* @since 3.0.0
|
|
*
|
|
* @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)
|
|
* @param {number} x - The amount to horizontally offset the Circle by.
|
|
* @param {number} y - The amount to vertically offset the Circle by.
|
|
*
|
|
* @return {Phaser.Geom.Circle} The Circle that was offset.
|
|
*/
|
|
var Offset = function (circle, x, y)
|
|
{
|
|
circle.x += x;
|
|
circle.y += y;
|
|
|
|
return circle;
|
|
};
|
|
|
|
module.exports = Offset;
|