recrownedgtk/RecrownedAthenaeum/Types/Rectangle.cs

24 lines
505 B
C#
Raw Normal View History

namespace RecrownedAthenaeum.Types
{
public struct Rectangle
{
public int Width {set; get;}
public int Height {set; get;}
public int X {set; get;}
public int Y {set; get;}
public int Area {
get {
return Width * Height;
}
}
public Rectangle(int x, int y, int width, int height) {
Width = width;
Height = height;
X = x;
Y = y;
}
}
}