distinguish between Translate and Translated

This commit is contained in:
kevin 2016-03-02 20:35:20 -08:00
parent 1e81187aeb
commit adeda6b7d1
2 changed files with 24 additions and 6 deletions

View file

@ -156,13 +156,22 @@ 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>

View file

@ -156,13 +156,22 @@ 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>