30 x1 = 2.0 * ( ( ( float ) rand() ) /
static_cast<float>(RAND_MAX) ) - 1.0;
31 x2 = 2.0 * ( ( ( float ) rand() ) /
static_cast<float>(RAND_MAX) ) - 1.0;
32 w = x1 * x1 + x2 * x2;
35 w = sqrtf( ( -2.0 * logf( w ) ) / w );
36 return x1 * w * fStandardDeviation + 0.0;