Hi everyone, I'm new here. This is not a homework of any kind, just a simple problem I encountered on my workplace. If this doesn't belong here, I'm sorry and I hope the admin could move it to somewhere more appropriate. Ok so here's my problem, the gif image below shows a phasor representation as a rotating vector. http://en.wikipedia.org/wiki/File:Unfasor.gif http://en.wikipedia.org/wiki/File:Unfasor.gif We develop a software with a GUI to display three phasor data that are always 60° from each other and similar to the rotating vector above, except that there will be 3 lines and they are almost always 120° to each other. The way we display the data is such that starting from the positive x-axis, turning counter-clockwise the reading will read from 0 to 180°. The reading from the positive x-axis turning clockwise (in the 4th & 3rd quadrant) will be from 0 to -180° (-180° doesnt really exist since the reading will change from 180° to -179.9999° the moment it crosses the x-axis). The three phasors will turn counter-clockwise at uniform speed with time. I need to display the absolute value of angle difference between any two phasors, since any values greater or lower than 120° will show abnormalities in the system. The problem is, I could only use a single equation to find the said difference. The components in the equation could either be the sources of reading (of which i want to find the difference) or any other constant. Thus, I will need to look for a single equation that could describe the differences in angle for all 3 possible input pairing. For example, (but do remember the values could go all the way to 180° and -180°) Phasor 1, x1 = 0° Phasor 2, x2 = 120° Phasor 3, x3 = -120° Does anyone have any idea what kind of equations could I use? Thanks in advance for any advice or suggestion.