refactoring to comply with c# conventions
This commit is contained in:
38
RhythmBullet/Utilities/DataTypes/Resolution.cs
Normal file
38
RhythmBullet/Utilities/DataTypes/Resolution.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RhythmBullet.Utilities.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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user