浏览代码

Merge pull request #304 from MugenHachi/patch-2

Updated vector turning math
Rémi Verschelde 8 年之前
父节点
当前提交
c90debd383
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      tutorials/vector_math.rst

+ 4 - 2
tutorials/vector_math.rst

@@ -166,10 +166,12 @@ Example:
 ::
 
     var v = Vector2(0,1)
+    
     # rotate right (clockwise)
-    var v_right = Vector2(-v.y, v.x)
-    # rotate left (counter-clockwise)
     var v_right = Vector2(v.y, -v.x)
+    
+    # rotate left (counter-clockwise)
+    var v_left = Vector2(-v.y, v.x)
 
 This is a handy trick that is often of use. It is impossible to do with
 3D vectors, because there are an infinite amount of perpendicular