@@ -114,7 +114,7 @@ Path.inject({ statics: new function() {
114114 } ,
115115
116116 RegularPolygon : function ( center , numSides , radius ) {
117- center = Point . read ( arguments , 0 ) ;
117+ center = Point . read ( arguments , 0 , 1 ) ;
118118 var path = new Path ( ) ,
119119 three = ! ( numSides % 3 ) ,
120120 vector = new Point ( 0 , three ? - radius : radius ) ,
@@ -128,17 +128,14 @@ Path.inject({ statics: new function() {
128128 } ,
129129
130130 Star : function ( center , numPoints , radius1 , radius2 ) {
131- center = Point . read ( arguments , 0 ) ;
131+ center = Point . read ( arguments , 0 , 1 ) ;
132132 numPoints *= 2 ;
133- var inner = Math . min ( radius1 , radius2 ) ,
134- outer = Math . max ( radius1 , radius2 ) ,
135- angle = 360 / numPoints ,
136- outerFirst = radius1 < radius2 ,
133+ var angle = 360 / numPoints ,
137134 path = new Path ( ) ;
138135 for ( var i = 0 ; i < numPoints ; i ++ ) {
139136 path . add ( center . add ( {
140137 angle : - 90 + angle * i ,
141- length : i % 2 == outerFirst ? outer : inner
138+ length : i % 2 ? radius2 : radius1
142139 } ) ) ;
143140 }
144141 path . closed = true ;
0 commit comments