phaser/src/geom/point/CopyFrom.js

26 lines
691 B
JavaScript
Raw Normal View History

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
*/
/**
* Copy the values of one Point to a destination Point.
2017-10-13 13:11:54 +00:00
*
* @function Phaser.Geom.Point.CopyFrom
* @since 3.0.0
*
2018-03-27 13:27:08 +00:00
* @generic {Phaser.Geom.Point} O - [dest,$return]
*
* @param {Phaser.Geom.Point} source - The source Point to copy the values from.
* @param {Phaser.Geom.Point} dest - The destination Point to copy the values to.
2017-10-13 13:11:54 +00:00
*
* @return {Phaser.Geom.Point} The destination Point.
2017-10-13 13:11:54 +00:00
*/
var CopyFrom = function (source, dest)
{
return dest.setTo(source.x, source.y);
};
module.exports = CopyFrom;