recrownedgtk/RecrownedAthenaeum/DataTypes/Resolution.cs

35 lines
632 B
C#
Raw Normal View History

using System;
namespace RecrownedAthenaeum.DataTypes
{
public class Resolution : IComparable<Resolution>
{
public int Width, Height;
public Resolution(int width, int height)
{
Width = width;
Height = height;
}
public Resolution()
{
}
public int CompareTo(Resolution other)
{
return Area() - other.Area();
}
public override string ToString()
{
return Width + "x" + Height;
}
public int Area()
{
return Width * Height;
}
}
}