Add RectangleF.TopRight (#661)

There was a TopLeft and a BottomRight, but no TopRight or BottomLeft... But there could be. :)
This commit is contained in:
jamieyello
2020-04-04 03:39:42 -04:00
committed by GitHub
parent 88e9ca5244
commit 5aa5ea701e
+11 -1
View File
@@ -120,6 +120,16 @@ namespace MonoGame.Extended
/// </summary>
public Point2 TopLeft => new Point2(X, Y);
/// <summary>
/// Gets the <see cref="Point2" /> representing the top-right of this <see cref="RectangleF" />.
/// </summary>
public Point2 TopRight => new Point2(X + Width, Y);
/// <summary>
/// Gets the <see cref="Point2" /> representing the bottom-left of this <see cref="RectangleF" />.
/// </summary>
public Point2 BottomLeft => new Point2(X, Y + Height);
/// <summary>
/// Gets the <see cref="Point2" /> representing the bottom-right of this <see cref="RectangleF" />.
/// </summary>
@@ -679,4 +689,4 @@ namespace MonoGame.Extended
internal string DebugDisplayString => string.Concat(X, " ", Y, " ", Width, " ", Height);
}
}
}