text: // -*- C++ -*-
  //
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  //
  //                                   Jiao Lin
  //                      California Institute of Technology
  //                        (C) 2005 All Rights Reserved
  //
  // {LicenseText}
  //
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  //
  
  
  #ifndef H_MCSTAS2_RANDOM_NUMBERS
  #define H_MCSTAS2_RANDOM_NUMBERS
  
  
  typedef int mc_int32_t;
  mc_int32_t mc_random(void);
  void mc_srandom (unsigned int x);
  unsigned long mt_random(void);
  void mt_srandom (unsigned long x);
  
  
  #ifndef MC_RAND_ALG
  #define MC_RAND_ALG 1
  #endif
  
  #if MC_RAND_ALG == 0
     /* Use system random() (not recommended). */
  #  define MC_RAND_MAX RAND_MAX
  #elif MC_RAND_ALG == 1
     /* "Mersenne Twister", by Makoto Matsumoto and Takuji Nishimura. */
  #  define MC_RAND_MAX ((unsigned long)0xffffffff)
  #  define random mt_random
  #  define srandom mt_srandom
  #elif MC_RAND_ALG == 2
     /* Algorithm used in McStas 1.1 and earlier (not recommended). */
  #  define MC_RAND_MAX 0x7fffffff
  #  define random mc_random
  #  define srandom mc_srandom
  #else
  #  error "Bad value for random number generator choice."
  #endif
  
  #define rand01() ( ((double)random())/((double)MC_RAND_MAX+1) )
  #define randpm1() ( ((double)random()) / (((double)MC_RAND_MAX+1)/2) - 1 )
  #define rand0max(max) ( ((double)random()) / (((double)MC_RAND_MAX+1)/(max)) )
  #define randminmax(min,max) ( rand0max((max)-(min)) + (min) )
  
  
  #endif// H_MCSTAS2_RANDOM_NUMBERS
  
  
  // version
  // $Id$
  
  // Generated automatically by CxxMill on Wed Jun 28 08:23:11 2006
  
  // End of file 
  