9 lines
195 B
C
9 lines
195 B
C
#include "toolbox.h"
|
|
|
|
float toolbox_random_float(float a, float b)
|
|
{
|
|
float random = ((float)rand()) / (float)RAND_MAX;
|
|
float diff = b - a;
|
|
float r = random * diff;
|
|
return a + r;
|
|
} |