phaser/src/geom/point/Clone.js

25 lines
548 B
JavaScript
Raw Normal View History

2018-02-12 16:01:20 +00:00
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var Point = require('./Point');
2017-10-13 13:11:54 +00:00
/**
* Clone the given Point.
2017-10-13 13:11:54 +00:00
*
* @function Phaser.Geom.Point.Clone
* @since 3.0.0
*
* @param {Phaser.Geom.Point} source - The source Point to clone.
2017-10-13 13:11:54 +00:00
*
* @return {Phaser.Geom.Point} The cloned Point.
2017-10-13 13:11:54 +00:00
*/
var Clone = function (source)
{
return new Point(source.x, source.y);
};
module.exports = Clone;