If (x < 0) then Ascendant = Ascendant + 180 else Ascendant = Ascendant + 360 .
Otherwise a direct result in the correct quadrant can be determined if calculator or programming software has the atan2(y,x) math function and then using the last rule.