added intersection() method to rect<T>