I would like to take the coordinates from objects being tracked on a 2d plane and convert them to a single range of 360 degrees for panning purposes. I am using a quadrophonic setup with speakers on each corner of a rectangular 2d plane, so speaker 1 would be located at 0 degrees, speaker 2 at 90 degrees, 3 at 180, and 4 at 270. The x-y coordinates are ranges of 0-1.
Essentially the values I would like after conversion are:
X:0 Y:0 = 0°
X:1 Y:0 = 90°
X:1 Y:1 = 180°
X:0 Y:1 = 270°
Is there any way I can achieve this?