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

14 lines
335 B
JavaScript
Raw Normal View History

2017-01-02 00:47:16 +00:00
var Contains = require('./Contains');
var ContainsRect = function (ellipse, rect)
{
return (
Contains(ellipse, rect.x, rect.y) &&
Contains(ellipse, rect.right, rect.y) &&
Contains(ellipse, rect.x, rect.bottom) &&
Contains(ellipse, rect.right, rect.bottom)
);
};
module.exports = ContainsRect;