grandom.h 486 Bytes
Newer Older
1 2 3
/*
 * grandom.h
 *
Albert Astals Cid's avatar
Albert Astals Cid committed
4 5
 * This file is licensed under the GPLv2 or later
 *
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
 * Pseudo-random number generation
 *
 * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
 */

#ifndef GRANDOM_H
#define GRANDOM_H

#include "gtypes.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Fills the given buffer with random bytes
 */
extern void grandom_fill(Guchar *buff, int size);

/*
 * Returns a random number in [0,1)
 */
extern double grandom_double();

#ifdef __cplusplus
}
#endif

#endif