Skip to content

Function random_normal

function random_normal(random_state &, T, T) base

template <size_t N, typename T>
KFR_INTRINSIC vec<T, N> random_normal(random_state& state, T mu, T sigma)

Generates N normally distributed (Gaussian) random values using Box-Muller transform.

Uses 2x uniform samples to generate normal values, rounded to the nearest power-of-two vector length.

Template parameters
N Number of normal values to generate.
T Floating-point type.
Parameters
state Reference to the random number generator state.
mu Mean of the distribution.
sigma Standard deviation of the distribution.
Returns
Vector of N values from N(mu, sigma^2).

Fully qualified name: kfr::random_normal(random_state &, T, T)

Declared at base/random.hpp:154

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.