github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/random.h (about)

     1  /*
     2    Copyright (C) 2009, 2014 GraphicsMagick Group
     3  
     4    This program is covered by multiple licenses, which are described in
     5    Copyright.txt. You should have received a copy of Copyright.txt with this
     6    package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
     7  
     8    Random number generator (semi-public interfaces).
     9  
    10    Currently based on George Marsaglia's multiply-with-carry generator.
    11    This is a k=2 generator with a period >2^60.
    12  */
    13  
    14  #ifndef _MAGICK_RANDOM_H
    15  #define _MAGICK_RANDOM_H
    16  
    17  #if defined(__cplusplus) || defined(c_plusplus)
    18  extern "C" {
    19  #endif /* defined(__cplusplus) || defined(c_plusplus) */
    20  
    21  typedef struct _MagickRandomKernel
    22  {
    23    magick_uint32_t z;
    24    magick_uint32_t w;
    25  } MagickRandomKernel;
    26  
    27  #define MAGICK_RANDOM_MAX 4294967295
    28  
    29    /*
    30      Generate a random integer value (0 - MAGICK_RANDOM_MAX)
    31    */
    32    MagickExport magick_uint32_t MagickRandomInteger(void);
    33  
    34    /*
    35      Generate a random double value (0.0 - 1.0)
    36    */
    37    MagickExport double MagickRandomReal(void);
    38  
    39  #if defined(MAGICK_IMPLEMENTATION)
    40  #include "magick/random-private.h"
    41  #endif /* defined(MAGICK_IMPLEMENTATION) */
    42  
    43  #if defined(__cplusplus) || defined(c_plusplus)
    44  }
    45  #endif /* defined(__cplusplus) || defined(c_plusplus) */
    46  
    47  #endif /* ifndef _MAGICK_RANDOM_H */
    48  
    49  /*
    50   * Local Variables:
    51   * mode: c
    52   * c-basic-offset: 2
    53   * fill-column: 78
    54   * End:
    55   */