mirror of
https://github.com/photonstorm/phaser
synced 2025-01-05 01:38:50 +00:00
14 lines
330 B
JavaScript
14 lines
330 B
JavaScript
|
var Contains = require('./Contains');
|
||
|
|
||
|
var ContainsRect = function (circle, rect)
|
||
|
{
|
||
|
return (
|
||
|
Contains(circle, rect.x, rect.y) &&
|
||
|
Contains(circle, rect.right, rect.y) &&
|
||
|
Contains(circle, rect.x, rect.bottom) &&
|
||
|
Contains(circle, rect.right, rect.bottom)
|
||
|
);
|
||
|
};
|
||
|
|
||
|
module.exports = ContainsRect;
|