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

9 lines
270 B
JavaScript
Raw Normal View History

var DistanceBetween = require('../../math/distance/DistanceBetween');
2017-01-04 00:21:26 +00:00
var CircleToCircle = function (circleA, circleB)
{
return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));
};
2017-01-04 00:21:26 +00:00
module.exports = CircleToCircle;