CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
CLHEP::RandEngineBuilder< 2147483647 > Struct Reference

Static Public Member Functions

static unsigned int thirtyTwoRandomBits (long &seq)
 

Detailed Description

Definition at line 338 of file RandEngine.cc.

Member Function Documentation

◆ thirtyTwoRandomBits()

static unsigned int CLHEP::RandEngineBuilder< 2147483647 >::thirtyTwoRandomBits ( long &  seq)
inlinestatic

Definition at line 339 of file RandEngine.cc.

339 {
340 unsigned int x = rand() << 1; ++seq; // bits 31-1
341 x ^= ( (x>>23) ^ (x>>7) ) ^1; // bit 0 (weakly pseudo-random)
342 return x & 0xFFFFFFFF; // mask in case int is 64 bits
343 }

The documentation for this struct was generated from the following file: