phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.
26 lines (22 loc) • 737 B
JavaScript
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var DistanceBetween = require('../../math/distance/DistanceBetween');
/**
* [description]
*
* @function Phaser.Geom.Intersects.CircleToCircle
* @since 3.0.0
*
* @param {Phaser.Geom.Circle} circleA - [description]
* @param {Phaser.Geom.Circle} circleB - [description]
*
* @return {boolean} [description]
*/
var CircleToCircle = function (circleA, circleB)
{
return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));
};
module.exports = CircleToCircle;