public static bool ContainsVector(this Rectangle rect, Vector2 point) { point.Intify(); return ((point.X > rect.Left && (point.X < (rect.Left + rect.Width))) && (point.Y > rect.Top && (point.Y < (rect.Top + rect.Height)))); }