# Equality of exponential functions from geometric series

I'm currently trying to understand why the first and second line of this equation

are in fact equal. This is taken from "Introduction to the Physics of Waves" by Tim Freegarde from a chapter about diffraction gratings. The notation is somewhat ambiguos (I think), but from the following lines it becomes clear that $\sin \vartheta /2$ is to be read as $\frac{\sin\vartheta}{2}$. But my question remains, what steps are neccessary to go from the first line to the second line?

Hint: Multiply the numerator and denominator by the factor $-e^{ikd \sin(\vartheta)/2}$.