phaser/src/geom/circle/CopyFrom.js

27 lines
795 B
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
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
*/
2016-12-29 00:17:20 +00:00
/**
* Copies the `x`, `y` and `radius` properties from the `source` Circle
* into the given `dest` Circle, then returns the `dest` Circle.
*
* @function Phaser.Geom.Circle.CopyFrom
* @since 3.0.0
*
2018-03-27 13:27:08 +00:00
* @generic {Phaser.Geom.Circle} O - [dest,$return]
*
* @param {Phaser.Geom.Circle} source - The source Circle to copy the values from.
2018-01-26 04:18:22 +00:00
* @param {Phaser.Geom.Circle} dest - The destination Circle to copy the values to.
2017-10-13 13:11:54 +00:00
*
* @return {Phaser.Geom.Circle} The destination Circle.
*/
2016-12-29 00:17:20 +00:00
var CopyFrom = function (source, dest)
{
return dest.setTo(source.x, source.y, source.radius);
};
module.exports = CopyFrom;