2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
15 Random::IntegerGenerator
Random::rand(int min
, int max
) {
16 return IntegerGenerator(&m_generator
, IntegerDistribution(min
, max
));
19 Random::RealGenerator
Random::rand(float min
, float max
) {
20 return RealGenerator(&m_generator
, RealDistribution(min
, max
));
23 Random::RealGenerator
Random::rand(double min
, double max
) {
24 return rand(static_cast<float>(min
),
25 static_cast<float>(max
));
28 Random
& Random::instance() {
29 static Random instance
;