2 #ifndef _GLIBMM_RANDOM_H
3 #define _GLIBMM_RANDOM_H
5 /* $Id: random.h 749 2008-12-10 14:23:33Z jjongsma $ */
9 * Copyright (C) 2002 The gtkmm Development Team
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 extern "C" { typedef struct _GRand GRand; }
34 /** @defgroup Random Random Numbers
35 * Pseudo random number generator.
43 explicit Rand(guint32 seed);
46 void set_seed(guint32 seed);
51 gint32 get_int_range(gint32 begin, gint32 end);
54 double get_double_range(double begin, double end);
56 GRand* gobj() { return gobject_; }
57 const GRand* gobj() const { return gobject_; }
64 Rand& operator=(const Rand&);
67 /** @} group Random */
72 #endif /* _GLIBMM_RANDOM_H */