You ultimately want the glide angle, so we can just look at the equilibrium equations for the glider as a starting point. I will assume a quasi-stationary, wings-level.
$$
L=W\cdot \sin{\gamma}
$$
$$
D=W\cdot \cos{\gamma}
$$
where $\gamma$ is the glide angle, positive downwards. This leads to the self-evident:
$$
\tan{\gamma}=\frac{1}{E}
$$
Which just says that the glide angle becomes shallower with increasing aerodynamic efficiency.
If we add in a thrust component to our glider, we can redo the above for a powered glide:
$$
L=W\cdot \sin{\gamma_p}
$$
$$
D=W\cdot \cos{\gamma_p}+T
$$
which gives:
$$
\tan{\gamma_p}=\frac{D-T}{L}= \frac{1}{E} - \frac{T}{L}
$$
This is dimensionally sound and, more importantly, converges to both the original glide angle equation for $T=0$ and to $\gamma=0$ (horizontal flight) for $T=D$.
For either angle, knowing your starting altitude, you can obtain the glide range as:
$$
x_{glide}=\frac{h}{\tan{\gamma}} \left( \approx \frac{h}{\gamma} \space \text{for small angles} \right)
$$