In my game, entities are rectangles, but are able to rotate, I need a way to tell collision between them taking into account the rotation. I have a double x and y and a double rotation
This was answered not long ago. You need to calculate the angles using sine and cosine, and then complete your collision detection based on the angles.
What you’re looking for is OBB (Oriented Bounding Box) Collisions. For collisions, I personally use a custom CollisionBox class that has 4 Vector2D’s as the vertices. When I rotate the box around it’s center, I rotate each point around that center point. If I were you, I would look into separated axis theorem.