mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 18:43:28 +00:00
15 lines
341 B
JavaScript
15 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;
|