Template Function librapid::randomPointInSphere#

Function Documentation#

template<typename T = float>
Vector<T, 3> librapid::randomPointInSphere()#

Generate a random point within the unit sphere.

Template Parameters

T – Scalar type of the vector, defaulting to float

Returns

3D vector, \(\vec{v}\), with \(0 \leq |\vec{v}| \leq 1\)