List of all members.
Detailed Description
Definition at line 23 of file randf.
Constructor & Destructor Documentation
inlib::randf::gauss::gauss |
( |
float |
a_mean = 0 , |
|
|
float |
a_std_dev = 1 |
|
) |
| [inline] |
Definition at line 25 of file randf.
:m_mean(a_mean),m_std_dev(a_std_dev){}
inlib::randf::gauss::gauss |
( |
const gauss & |
a_from | ) |
[inline] |
Definition at line 28 of file randf.
:m_mean(a_from.m_mean),m_std_dev(a_from.m_std_dev){}
Member Function Documentation
gauss& inlib::randf::gauss::operator= |
( |
const gauss & |
a_from | ) |
[inline] |
Definition at line 30 of file randf.
{
m_mean = a_from.m_mean;
m_std_dev = a_from.m_std_dev;
return *this;
}
float inlib::randf::gauss::shoot |
( |
| ) |
const [inline] |
Definition at line 36 of file randf.
{
float v1,v2,r,fac;
do {
v1 = 2 * m_flat.shoot() - 1;
v2 = 2 * m_flat.shoot() - 1;
r = v1*v1 + v2*v2;
} while ( r > 1 );
fac = fsqrt(-2*flog(r)/r);
return (v2 * fac) * m_std_dev + m_mean;
}
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/randf