The answer is "r=pi-theta".
The reference angle refers to the angle that the given edge or angle makes with the x-pivot. Regardless where the angle closes or ends, it does mot matter where the terminal side of the angle is located, the reference angle measures the nearest distance of that terminal side to the x-axis.