Commit d5aa2784 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

update comment and use drand48 instead of rand

parent a6c704f8
......@@ -30,8 +30,8 @@
* Please read the license
*
* Load a file with a format like :
* NB_particles Box_width Box_X Box_Y Box_Z // init
* X Y Z // one particle by line
* NB_particles Box_width Center_X Center_Y Center_Z // init
* X Y Z PhysicalValue // one particle by line
* ....
* <code>
* FFmaBinLoader<FBasicParticle> loader("../Adir/Tests/particles.basic.txt"); <br>
......
......@@ -30,8 +30,8 @@
* Please read the license
*
* Load a file with a format like :
* NB_particles Box_width Box_X Box_Y Box_Z // init
* X Y Z // one particle by line
* NB_particles Box_width Center_X Center_Y Center_Z // init
* X Y Z PhysicalValue // one particle by line
* ....
* @code
* FFmaLoader<FBasicParticle> loader("../ADir/Tests/particles.basic.txt"); <br>
......
......@@ -45,7 +45,7 @@ public:
FRandomLoader(const size_t inNbParticles, const FReal inBoxWidth = 1.0,
const FPoint& inCenterOfBox = FPoint(0,0,0), const unsigned int inSeed = static_cast<unsigned int>(0))
: nbParticles(inNbParticles), boxWidth(inBoxWidth), centerOfBox(inCenterOfBox) {
srand(inSeed);
srand48(inSeed);
}
/**
......@@ -99,7 +99,7 @@ public:
/** Get a random number between 0 & 1 */
FReal getRandom() const{
return FReal(rand())/FReal(RAND_MAX);
return FReal(drand48());
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment