phaser/src/geom/circle/ContainsPoint.js

20 lines
568 B
JavaScript
Raw Normal View History

2016-12-29 00:17:20 +00:00
var Contains = require('./Contains');
/**
2018-01-26 04:18:22 +00:00
* Check to see if the Circle contains the given Point object.
*
* @function Phaser.Geom.Circle.ContainsPoint
* @since 3.0.0
*
2018-01-26 04:18:22 +00:00
* @param {Phaser.Geom.Circle} circle - The Circle to check.
* @param {Phaser.Geom.Point|object} point - The Point object to check if it's within the Circle or not.
2017-10-13 13:11:54 +00:00
*
2018-01-26 04:18:22 +00:00
* @return {boolean} True if the Point coordinates are within the circle, otherwise false.
*/
2016-12-29 00:17:20 +00:00
var ContainsPoint = function (circle, point)
{
return Contains(circle, point.x, point.y);
};
module.exports = ContainsPoint;