From f198d7f204a21db8af898144f96c38d9c8c31b99 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 22 Jul 2013 20:34:09 +1200 Subject: [PATCH] Add WVec.ToCVec() extension method. --- OpenRA.Game/CPos.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/CPos.cs b/OpenRA.Game/CPos.cs index b1743ea037..4a9151a269 100644 --- a/OpenRA.Game/CPos.cs +++ b/OpenRA.Game/CPos.cs @@ -72,8 +72,9 @@ namespace OpenRA public static CPos BottomRightAsCPos(this Rectangle r) { return new CPos(r.Right, r.Bottom); } } - public static class WPosExtensions + public static class WorldCoordinateExtensions { public static CPos ToCPos(this WPos a) { return new CPos(a.X / 1024, a.Y / 1024); } + public static CVec ToCVec(this WVec a) { return new CVec(a.X / 1024, a.Y / 1024); } } } \ No newline at end of file