remove some duplication and dead code

This commit is contained in:
Chris Forbes
2011-12-27 14:47:17 +13:00
parent 132c678594
commit 523183431b
9 changed files with 38 additions and 61 deletions

View File

@@ -181,5 +181,19 @@ namespace OpenRA
{
return ts.Concat(moreTs);
}
public static Color ColorLerp(float t, Color c1, Color c2)
{
return Color.FromArgb(
(int)(t * c2.A + (1 - t) * c1.A),
(int)(t * c2.R + (1 - t) * c1.R),
(int)(t * c2.G + (1 - t) * c1.G),
(int)(t * c2.B + (1 - t) * c1.B));
}
}
public static class Enum<T>
{
public static T Parse(string s) { return (T)Enum.Parse(typeof(T), s); }
}
}