phaser/v3/src/geom/ellipse/GetBounds.js
2017-01-01 18:23:19 +00:00

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;