You can use the signs of the $ sin A $ and $ cos A $ to determine the proper quadrant:

The equations in the Explanatory Supplement to the Astronomical Almanac are slightly different than the ones above. These are recond with $0^\circ$ being North, and Western longitudes negative.
$$
\begin{align*}
\cos \mathit{a} \sin A_{z} &= -\cos \delta \sin \mathit{h} & (eq 1)
\\
\cos \mathit{a} \cos A_{z} &= \sin \delta \cos \phi - \cos \delta \cos \mathit{h} \sin \phi & (eq 2)
\\
\sin \mathit{a} &= \sin \delta \sin \phi + \cos \delta \cos \mathit{h} \cos \phi & (eq 3)
\end{align*}
$$
Where $h$ is the hour angle, $\delta$ is the declination, $A_{z}$ is azimuth, $a$ is altitude, $\phi$ is the lattitude.
You will need to check the signs of $\cos A_z$ and $\sin A_z$ to determine the propper quadrant:
if $\cos A_z$ > 0 and $\sin A_z$ > 0: use either eq1 or eq2
if $\cos A_z$ > 0 and $\sin A_z$ < 0: use eq1
if $\cos A_z$ < 0 and $\sin A_z$ < 0: use $A_z$ = 360 - eq2
if $\cos A_z$ < 0 and $\sin A_z$ > 0: use eq2
Alternatively, I prefer to use the equations below, which allows the use of the atan2() function built in to most languages. These are based on those in Meeus, but I have modified them so that Az=$0^\circ$ is North, and Western longitudes are negative (same as above), agreeing with what is in common use today.
$$
\begin{aligned}
\tan A &= \dfrac{\sin H}{\cos H \sin \phi - \tan \delta \cos \phi}
\\~\\
\sin a &= \sin \phi \sin \delta + \cos \phi \cos \delta \cos H
\end{aligned}
$$
The page Convert RA/Dec to Alt/Az has implementations of these, and two other alternate methods. As well as test data to verify accuracy.