mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-21 17:14:38 -05:00
Fix issue with 'Bodies.circle' usage.
This commit is contained in:
parent
7ec38a1f1c
commit
7ede227cf4
1 changed files with 3 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue