 by its norm,
<span class="math inline">\(\Vert y \Vert = \sqrt{y^\top y}\)</span>, to obtain a unit vector <span class="math inline">\(x\)</span>,</p>
<p><span class="math display">\[
x = \frac{y}{\Vert y \Vert}.
\]</span></p>
<p>To generate a unit vector, Stan generates points at random in
<span class="math inline">\(\mathbb{R}^n\)</span> with independent unit normal distributions, which are then
standardized by dividing by their Euclidean length.
<span class="citation"><a href="#ref-Marsaglia:1972" role=