Browse Source

Oops, forgot 2 calls to clamp()

Julian Murgia 9 years ago
parent
commit
c62f18956f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/2d/custom_drawing_in_2d.rst

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

@@ -232,8 +232,8 @@ In our case, we simply need to multiply our 'rotation_ang' variable by 'delta' i
  func _process(delta):
      angle_from += rotation_ang * delta
      angle_to += rotation_ang * delta
-     angle_from = clamp(angle_from, 0, 360)
-     angle_to = clamp(angle_to, 0, 360)
+     angle_from = wrap(angle_from, 0, 360)
+     angle_to = wrap(angle_to, 0, 360)
      update()
 
 Let's run again! This time, the rotation displays fine!