4 // -----------------------------------------------------------------------
7 // inlined functions implementation file
8 // -----------------------------------------------------------------------
10 // =======================================================================
11 // M.Fischler - Created, along same lines as RandGaussQ.icc
12 // =======================================================================
16 inline RandBit::RandBit(HepRandomEngine & anEngine)
20 inline RandBit::RandBit(HepRandomEngine & anEngine, double width )
21 : RandFlat (anEngine, width)
24 inline RandBit::RandBit(HepRandomEngine & anEngine, double a,
26 : RandFlat (anEngine, a, b)
29 inline RandBit::RandBit(HepRandomEngine * anEngine)
33 inline RandBit::RandBit(HepRandomEngine * anEngine, double width )
34 : RandFlat (anEngine, width)
37 inline RandBit::RandBit(HepRandomEngine * anEngine, double a,
39 : RandFlat (anEngine, a, b)
42 //---------------------
44 inline int RandBit::shootBit() {
46 return (x > .5) ? 1 : 0;
49 //---------------------
52 inline int RandBit::shootBit(HepRandomEngine* engine) {
53 double x = shoot(engine);
54 return (x > .5) ? 1 : 0;
57 //---------------------
60 inline int RandBit::fireBit() {
62 return (x > .5) ? 1 : 0;