mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
what do you even write here?
This commit is contained in:
@ -531,7 +531,6 @@ int rand_int(int min, int max)
|
||||
}
|
||||
|
||||
// From http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
|
||||
#define TWO_PI 6.2831853071795864769252866
|
||||
float rand_normal()
|
||||
{
|
||||
static int haveSpare = 0;
|
||||
@ -578,6 +577,11 @@ size_t rand_size_t()
|
||||
|
||||
float rand_uniform(float min, float max)
|
||||
{
|
||||
if(max < min){
|
||||
float swap = min;
|
||||
min = max;
|
||||
max = swap;
|
||||
}
|
||||
return ((float)rand()/RAND_MAX * (max - min)) + min;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user