Skip to content

Commit 6c6103a

Browse files
committed
Add rotated property
1 parent 6a06272 commit 6c6103a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Synercoding.Primitives/Size.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ public static Size Empty
5858
/// </summary>
5959
public Value Height { get; }
6060

61+
/// <summary>
62+
/// The rotated version of this <see cref="Size"/>; Same as calling var newSize = new Size(oldSize.Height, oldSize.Width);
63+
/// </summary>
64+
public Size Rotated
65+
=> new Size(Height, Width);
66+
6167
/// <summary>
6268
/// Get the <see cref="Primitives.Orientation"/> of the size
6369
/// </summary>

0 commit comments

Comments
 (0)