فهرست منبع

added Vector2.addInPlace()

Kesshi 9 سال پیش
والد
کامیت
218ab4ea2f
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      src/Math/babylon.math.ts

+ 7 - 0
src/Math/babylon.math.ts

@@ -483,6 +483,13 @@
             return this;
         }
 
+        public addInPlace(otherVector: Vector2): Vector2 {
+            this.x += otherVector.x;
+            this.y += otherVector.y;
+
+            return this;
+        }
+
         public addVector3(otherVector: Vector3): Vector2 {
             return new Vector2(this.x + otherVector.x, this.y + otherVector.y);
         }