phaser/src/geom/circle/Circumference.js

17 lines
380 B
JavaScript
Raw Normal View History

/**
2018-01-26 04:18:22 +00:00
* Returns the circumference of the given Circle.
*
* @function Phaser.Geom.Circle.Circumference
* @since 3.0.0
*
* @param {Phaser.Geom.Circle} circle - The Circle to get the circumference of.
2017-10-13 13:11:54 +00:00
*
* @return {number} The circumference of the Circle.
*/
2016-12-29 00:17:20 +00:00
var Circumference = function (circle)
{
return 2 * (Math.PI * circle.radius);
};
module.exports = Circumference;