This is just an example X=-20cos(t) y=cos(t-45deg) X has to be positive so X=-20cos(t±180deg) I know you want the angle ^ to be the smallest magnitude, but for this case both would give you a magnitude of 180 deg. So which one would you pick X=20cos(t-180deg) or X=20cos(t+180deg)? This would change the answer of whether X or Y was leading. Someone told me you should pick the angle that makes a phase difference that is <180deg. So in this case it would be X=20cos(t-180deg) since that would give a phase difference of 135 degree compared to the 180+45=225deg phase difference if we picked the positive. Is that right?