recrownedgtk/RecrownedAthenaeum/DataTypes/Resolution.cs

39 lines
734 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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;
}
}
}