public static Vector2 getCenter( ref Rectangle rect ) { return new Vector2( rect.X + rect.Width / 2, rect.Y + rect.Height / 2 ); }