I'm currently trying to create a goniometer - like the one in the Waves PAZ package.

However I can't seem to find any algorithm that describes how to get from the samples to the angles.
I'd guess that the angles would be something like this:
-45 = Left
45 = Right
0 = Centre/mono
<45 = Out of phase
>-45 = Out of phase
I've already got an FFT component working that provides the amplitude for each sample.
Any help would be greatly appreciated!
Thanks,
Hawx