Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -66,6 +66,15 @@ namespace Barotrauma.Extensions
|
||||
value.Top > bottom && rect.Top > otherBottom;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the y-coordinate of the rectangle so that up is greater and down is lower
|
||||
/// (i.e. so the Location of the rectangle is at the top-left corner in world coordinates).
|
||||
/// </summary>
|
||||
public static Rectangle ToWorldRect(this Rectangle rect)
|
||||
{
|
||||
return new Rectangle(rect.X, rect.Y - rect.Height, rect.Size.X, rect.Size.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Like the XNA method, but treats the y-coordinate so that up is greater and down is lower.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user