Doing collision detection on two arbitrary rectangles is easy, given their coordinates and dimensions. In regular 2d-space, that is.
But what about "finite but limitless" space, say a screen area that theoretically folds back on itself, so that if an object exits on one edge, it comes back at the other?
Picture to clarify:

An obvious way would be to check if the rectangle is being "split", and if so, run regular collision detection on the two/four resulting rectangles. But is there any general (and faster) way to do collision detection on space that folds back on itself?
Here are some thoughts for you to think about...
In a normal Cartesian plane, the concept of betweenness can be defined by a pair of inequalities: eg. the set of points between 5 and 9 can be defined as $\{x: 5 \le x \le 9 \}$. When you check if a rectangle has 'collided' with another rectangle, what you are doing is testing each corner $C$ for the following: is the $C_x$ value between two numbers, and is the $C_y$ value between two numbers?
However in your "wrap around" space, if we think of it as the Cartesian product of the integers mod screen width and the integers mod screen height, then we cannot express betweenness in the same way, as every number is technically less than every other number. In fact, for any pair of numbers, there are two viable sets that represent every number 'between' the pair: eg In $\mathbb{Z}_{12}$ (like the numbers on a clock), the set of numbers between 5 and 9 could be 6,7,8, but they could also be 10,11,12,1,2,3,4. We need to reduce this to a single unique set in order to be able to define betweenness.
Because you are using two vectors to store your rectangles (one for position $P$, another for dimension $D$), you could distinguish these two sets as the former being the set from 5 to 9 and the latter being the set from 9 to 5. A point $a$ is inside your rectangle if $a_x$ is between $P_x$ and $P_x + D_x$, and $a_y$ is between $P_y$ and $P_y + D_y$ (all values modulo the appropriate screen dimension).
The trick is to test the boundary points first. In our 5 to 9 example, we see that 5 is less than 9, and thus we can compare "normally". In the 9 to 5 example, we see that 9 is not less than 5, and therefore we compare "oppositely", ie the set of points between 9 and 5 is defined as $\{x: x \le 5 \text{ or } x \ge 9 \} $.
And don't forget to watch out for degenerate cases! If a rectangle is larger than the entire screen, just return true no matter what.