I have a rectangle given two corners at opposite ends that we'll call A and B. I need to be able to figure out the remaining corners given these two points and the angle by which the rectangle is rotated.
Excuse my sloppy drawing. I hope it gets the idea across. The gray rectangle is rotated by an angle of alpha, which is roughly 20° in my sketch.
How would I be able to calculate the remaining corners?

Some hints, I won't include a full solution, so you can try your self.
Let's call the upper left intersection of the black rectangle on the grey rectangle C And D for the other side. Given that the grey rectangle is actually a rectangle we know that each two facing sides are parallel, also it's easy to prove that AC and BD are parallel, Thus the shape ACBD is a parallelogram.
By definition each two facing angles of a parallelogram are the equal.
And finally we can use the fact that the sum of the angles of any triangle is equal to 180.