Files
2018-12-07 15:15:39 +01:00

46 lines
1.1 KiB
C++

// -*- C++ -*-
//
// -----------------------------------------------------------------------
// HEP Random
// --- RandGeneral ---
// inlined functions implementation file
// -----------------------------------------------------------------------
// =======================================================================
// Gabriele Cosmo - Created: 20th August 1998
//
// M. Fischler - Moved fire() and shoot(anEngine) into inline so that
// the use of mapRandom does not cost an extra function call.
// =======================================================================
namespace CLHEP {
inline double RandGeneral::fire()
{
double rand = localEngine->flat();
return mapRandom(rand);
}
inline double RandGeneral::shoot()
{
return fire();
}
inline double RandGeneral::operator() ()
{
return fire();
}
inline double RandGeneral::shoot( HepRandomEngine* anEngine )
{
double rand = anEngine->flat();
return mapRandom(rand);
}
inline void RandGeneral::shootArray( const int size, double* vect )
{
fireArray(size, vect);
}
} // namespace CLHEP