phaser/v3/src/geom/circle/Area.js

16 lines
335 B
JavaScript
Raw Normal View History

/**
* [description]
*
* @function Phaser.Geom.Circle.Area
* @since 3.0.0
*
* @param {Phaser.Geom.Circle} circle - The Circle to get the area of.
* @return {number} The area of the Circle.
*/
2016-12-29 00:17:20 +00:00
var Area = function (circle)
{
return (circle.radius > 0) ? Math.PI * circle.radius * circle.radius : 0;
};
module.exports = Area;