mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-25 20:31:04 +00:00
distinguish between Translate and Translated
This commit is contained in:
parent
1e81187aeb
commit
adeda6b7d1
|
@ -156,13 +156,22 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a Box2 translated by the given amount.
|
/// Returns a Box2 translated by the given amount.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="point"></param>
|
public Box2 Translated(Vector2 point)
|
||||||
/// <returns></returns>
|
|
||||||
public Box2 Translate(Vector2 point)
|
|
||||||
{
|
{
|
||||||
return new Box2(Left + point.X, Top + point.Y, Right + point.X, Bottom + point.Y);
|
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>
|
/// <summary>
|
||||||
/// Equality comparator.
|
/// Equality comparator.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -156,13 +156,22 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a Box2d translated by the given amount.
|
/// Returns a Box2d translated by the given amount.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="point"></param>
|
public Box2d Translated(Vector2d point)
|
||||||
/// <returns></returns>
|
|
||||||
public Box2d Translate(Vector2d point)
|
|
||||||
{
|
{
|
||||||
return new Box2d(Left + point.X, Top + point.Y, Right + point.X, Bottom + point.Y);
|
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>
|
/// <summary>
|
||||||
/// Equality comparator.
|
/// Equality comparator.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue