Method

NumCosmoMathQuaternionset_random

Declaration [src]

void
ncm_quaternion_set_random (
  NcmQuaternion* q,
  NcmRNG* rng
)

Description [src]

Sets a NcmQuaternion to a random value, using the given NcmRNG. The components of the three-dimensional vector are uniformly distributed in the interval [-1, 1] and the angle is uniformly distributed in the interval [0, 2*pi].

It represents a random rotation in three-dimensional space.

Parameters

rng

Type: NcmRNG

A NcmRNG.

The data is owned by the caller of the method.