There are two ways we can check for collision between two oriented rectangles. First, we could extend the SAT test with two additional axis. This means we would have six axes of potential separation:
The X and Y axis of the world
The local X and Y axis of the first rectangle
The local X and Y axis of the second rectangle.
While adding two new axes of potential separation would not increase the cost of the collision check too much, there is an alternate, somewhat easier way we can perform an intersection test between two oriented rectangles.
The other way to check intersection would be to translate both rectangles into the local space of the first rectangle, leaving us with a non-oriented rectangle and an oriented rectangle. At that point we could just call our existing function from the last section. We're going to use the latter method, where we translate one rectangle into the local space of the other one.