1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtRandomEngine.cc
13 // Description: routines to generate random numbers
14 // really trivial random number
17 // Modification history:
19 // RYD December 25, 1999 Module created
21 //------------------------------------------------------------------------
23 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtSimpleRandomEngine.hh"
31 double EvtSimpleRandomEngine::random(){
33 _next=_next*1103515245+123345;
34 unsigned temp=(unsigned)(_next/65536) % 32768;
36 return ( temp + 1.0 ) / 32769.0;