Calculating Edge points of a rectangle in 2D I'm building a computer game and I got stuck during a math calculation:

The game is a 2D game and is based on a Cartesian coordinate system.
I know the coordinates of E and F. From there I know the angle of EF (Also the angle of AB and CD). I also know the length of AB and the length of CD. 
I'm having a hard time finding the solution of calculationg A, B, C and D.
Any help would be appreciated
Thanks!

Let E be $(0, 0)$:
F = $(EF\cos\theta, EF\sin\theta)$
A = $(-\frac{AB}{2}\cos\theta, \frac{AB}{2}\sin\theta)$
B = $(\frac{AB}{2}\cos\theta, -\frac{AB}{2}\sin\theta)$
C = $(EF\cos\theta + \frac{CD}{2}\cos\theta, EF\sin\theta - \frac{CD}{2}\cos\theta)$
D = $(EF\cos\theta - \frac{CD}{2}\cos\theta, EF\sin\theta + \frac{CD}{2}\cos\theta)$
