rhythmbullet/RhythmBullet/Zer01HD/Utilities/Resolution.cs

35 lines
694 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.Game.Preferences
{
public class Resolution : IComparable<Resolution>
{
public int Width, Height;
public Resolution(int width, int height)
{
Width = width;
Height = height;
}
public int CompareTo(Resolution other)
{
return Area() - other.Area();
}
public override string ToString()
{
return Width + "x" + Height;
}
public int Area()
{
return Width * Height;
}
}
}