From adeda6b7d12698d302faba4be0f1703b19265b22 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 2 Mar 2016 20:35:20 -0800 Subject: [PATCH] distinguish between Translate and Translated --- Source/OpenTK/Math/Box2.cs | 15 ++++++++++++--- Source/OpenTK/Math/Box2d.cs | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Source/OpenTK/Math/Box2.cs b/Source/OpenTK/Math/Box2.cs index 0abfa8ce..cf2d3906 100644 --- a/Source/OpenTK/Math/Box2.cs +++ b/Source/OpenTK/Math/Box2.cs @@ -156,13 +156,22 @@ namespace OpenTK /// /// Returns a Box2 translated by the given amount. /// - /// - /// - 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); } + /// + /// Translates this Box2 by the given amount. + /// + public void Translate(Vector2 point) + { + Left += point.X; + Right += point.X; + Top += point.Y; + Bottom += point.Y; + } + /// /// Equality comparator. /// diff --git a/Source/OpenTK/Math/Box2d.cs b/Source/OpenTK/Math/Box2d.cs index 6ae120fe..5fa6059c 100644 --- a/Source/OpenTK/Math/Box2d.cs +++ b/Source/OpenTK/Math/Box2d.cs @@ -156,13 +156,22 @@ namespace OpenTK /// /// Returns a Box2d translated by the given amount. /// - /// - /// - 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); } + /// + /// Translates this Box2d by the given amount. + /// + public void Translate(Vector2d point) + { + Left += point.X; + Right += point.X; + Top += point.Y; + Bottom += point.Y; + } + /// /// Equality comparator. ///