Browse Source

fixing Arc polygon function example for GDScript

GDScript fixing an error in the example: Arc polygon function there is missing ")" on deg2rad.
Abdulrahman 7 years ago
parent
commit
f601faf35c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tutorials/2d/custom_drawing_in_2d.rst

+ 1 - 1
tutorials/2d/custom_drawing_in_2d.rst

@@ -246,7 +246,7 @@ We can take this a step further and not only write a function that draws the pla
         var colors = PoolColorArray([color])
     
         for i in range(nb_points+1):
-            var angle_point = deg2rad(angle_from + i * (angle_to - angle_from) / nb_points - 90
+            var angle_point = deg2rad(angle_from + i * (angle_to - angle_from) / nb_points - 90)
             points_arc.push_back(center + Vector2(cos(angle_point), sin(angle_point)) * radius)
         draw_polygon(points_arc, colors)