forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCopyFrom.js
More file actions
25 lines (23 loc) · 786 Bytes
/
Copy pathCopyFrom.js
File metadata and controls
25 lines (23 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Copy the values of one Rectangle to a destination Rectangle.
*
* @function Phaser.Geom.Rectangle.CopyFrom
* @since 3.0.0
*
* @generic {Phaser.Geom.Rectangle} O - [dest,$return]
*
* @param {Phaser.Geom.Rectangle} source - The source Rectangle to copy the values from.
* @param {Phaser.Geom.Rectangle} dest - The destination Rectangle to copy the values to.
*
* @return {Phaser.Geom.Rectangle} The destination Rectangle.
*/
var CopyFrom = function (source, dest)
{
return dest.setTo(source.x, source.y, source.width, source.height);
};
module.exports = CopyFrom;