mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 02:53:27 +00:00
16 lines
341 B
JavaScript
16 lines
341 B
JavaScript
|
var Rectangle = require('../rectangle/Rectangle');
|
||
|
|
||
|
var GetBounds = function (ellipse, out)
|
||
|
{
|
||
|
if (out === undefined) { out = new Rectangle(); }
|
||
|
|
||
|
out.x = ellipse.x - ellipse.width;
|
||
|
out.y = ellipse.y - ellipse.height;
|
||
|
out.width = ellipse.width;
|
||
|
out.height = ellipse.height;
|
||
|
|
||
|
return out;
|
||
|
};
|
||
|
|
||
|
module.exports = GetBounds;
|