phaser/src/geom/point/CopyFrom.js

26 lines
717 B
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
2019-01-15 16:20:22 +00:00
* @copyright 2019 Photon Storm Ltd.
2018-02-12 16:01:20 +00:00
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* 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;