phaser/v3/src/geom/ellipse/GetBounds.js

16 lines
341 B
JavaScript
Raw Normal View History

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;