distinguish between Translate and Translated
authorkevin <sudo@pt-get.com>
Thu, 3 Mar 2016 04:35:20 +0000 (20:35 -0800)
committerkevin <sudo@pt-get.com>
Thu, 3 Mar 2016 04:35:20 +0000 (20:35 -0800)
Source/OpenTK/Math/Box2.cs
Source/OpenTK/Math/Box2d.cs

index 0abfa8c..cf2d390 100644 (file)
@@ -156,14 +156,23 @@ namespace OpenTK
         /// <summary>
         /// Returns a Box2 translated by the given amount.
         /// </summary>
-        /// <param name="point"></param>
-        /// <returns></returns>
-        public Box2 Translate(Vector2 point)
+        public Box2 Translated(Vector2 point)
         {
             return new Box2(Left + point.X, Top + point.Y, Right + point.X, Bottom + point.Y);
         }
 
         /// <summary>
+        /// Translates this Box2 by the given amount.
+        /// </summary>
+        public void Translate(Vector2 point)
+        {
+            Left += point.X;
+            Right += point.X;
+            Top += point.Y;
+            Bottom += point.Y;
+        }
+
+        /// <summary>
         /// Equality comparator.
         /// </summary>
         public static bool operator ==(Box2 left, Box2 right)
index 6ae120f..5fa6059 100644 (file)
@@ -156,14 +156,23 @@ namespace OpenTK
         /// <summary>
         /// Returns a Box2d translated by the given amount.
         /// </summary>
-        /// <param name="point"></param>
-        /// <returns></returns>
-        public Box2d Translate(Vector2d point)
+        public Box2d Translated(Vector2d point)
         {
             return new Box2d(Left + point.X, Top + point.Y, Right + point.X, Bottom + point.Y);
         }
 
         /// <summary>
+        /// Translates this Box2d by the given amount.
+        /// </summary>
+        public void Translate(Vector2d point)
+        {
+            Left += point.X;
+            Right += point.X;
+            Top += point.Y;
+            Bottom += point.Y;
+        }
+
+        /// <summary>
         /// Equality comparator.
         /// </summary>
         public static bool operator ==(Box2d left, Box2d right)