瀏覽代碼

fix Vector2 normalize() wrong multiplication

jbousquie 9 年之前
父節點
當前提交
dba9330079
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Math/babylon.math.ts

+ 3 - 3
src/Math/babylon.math.ts

@@ -472,8 +472,8 @@
 
 
             var num = 1.0 / len;
             var num = 1.0 / len;
 
 
-            this.x *= len;
-            this.y *= len;
+            this.x *= num;
+            this.y *= num;
 
 
             return this;
             return this;
         }
         }
@@ -786,7 +786,7 @@
                 return this;
                 return this;
 
 
             var num = 1.0 / len;
             var num = 1.0 / len;
-            
+
             this.x *= num;
             this.x *= num;
             this.y *= num;
             this.y *= num;
             this.z *= num;
             this.z *= num;