phaser/v3/src/geom/intersects/CircleVsCircle.js

9 lines
270 B
JavaScript
Raw Normal View History

var DistanceBetween = require('../../math/distance/DistanceBetween');
var CircleVsCircle = function (circleA, circleB)
{
return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));
};
module.exports = CircleVsCircle;