Uniform distribution on a sphere.
X ~ 1 with X[0]^^2 + .. + X[$-1]^^2 = 1
Generate random points on a circle
import mir.random.engine; import mir.math.common: fabs; double[2] x; sphereVar()(rne, x); assert(fabs(x[0] * x[0] + x[1] * x[1] - 1) < 1e-10);
See Implementation
Uniform distribution on a sphere.