I made a formula for converting reference angle to degrees from initial side to terminal side:
$$\left\lvert90(\,Mod\left(Mod(Q\, ,\, 2\right)+ 1\,,2)) - Θ\right\rvert + 90(Q-1)$$ Where Θ is the reference angle $\qquad$ and $\qquad$ Q is the quadrant (an integer 1 through 4)
I've done some testing, and I'm fairly certain it works with minutes and seconds as well, but I figured it would be good to get smarter people's opinions. [also, is there a way to shorten this possibly?]
EDIT: Woah, thanks for that Blue, I guess while fidgeting around with the aesthetics, I forgot the 90!, and yes Jens, Theta represents any angle $ 0° \le \Theta \le 90° $