Go to the documentation of this file. 1 #ifndef __JMATH__JRANDOM__
2 #define __JMATH__JRANDOM__
17 namespace JPP {
using namespace JMATH; }
25 template<class T, bool is_specialized = JLimits<T>::is_specialized>
55 return (T) gRandom->Uniform((Double_t) min, (Double_t) max);
157 const double precision)
159 double value = getRandom<double>(min, max);
161 if (precision != 0.0) {
163 const long long int ip = (
long long int) (1.0 / precision);
165 value = ((double) ((
long long int) (value * ip))) / ip;
static T getRandom()
Get uniformly distributed random value between numerical limits.
static T getRandom(const T min, const T max)
Get uniformly distributed random value between given limits.
Auxiliary class for minimum and maximum values for any class.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static T value
Definition of value.
static const T & getRandom()
Get random value.
Auxiliary classes and methods for mathematical operations.
double getRandom(const double min, const double max, const double precision)
Template specialisation for data type double.
double getRandom()
Template specialisation for data type double because TRandom has 32 bits.
Template definition of random value generator.