I know this is a rather simple question, but I\'m just not too good at maths.
I know how to generate a random float between 0 and 1:
float random = ((flo
float RandomFloat(float a, float b) { float random = ((float) rand()) / (float) RAND_MAX; float diff = b - a; float r = random * diff; return a + r; }
This works by returning a plus something, where something is between 0 and b-a which makes the end result lie in between a and b.
a
b-a
b