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;
void randomize(Vec *p)
Randomize 3D vector.
Definition of minimum and maximum values for any class.
Auxiliary classes and methods for mathematical operations.
double getRandom(const double min, const double max, const double precision)
Template specialisation for data type double.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for minimum and maximum values for any class.
static const T & getRandom()
Get random value.
static T value
Definition of value.
static T getRandom(const T min, const T max)
Get uniformly distributed random value between given limits.
static T getRandom()
Get uniformly distributed random value between numerical limits.
Template definition of random value generator.
double getRandom()
Template specialisation for data type double because TRandom has 32 bits.