0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-03-14 00:38:41 -04:00
This commit is contained in:
eezz4 2024-06-24 18:33:23 +02:00 committed by GitHub
commit 1ce39c0e19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,6 +116,9 @@ var Vector = require('../geometry/Vector');
* @return {body} A new circle body
*/
Bodies.circle = function(x, y, radius, options, maxSides) {
if( radius === 0 )
throw new Error('The radius of `Bodies.circle` must be non-zero.');
options = options || {};
var circle = {