Looking to make a really simple random number generator method in C. The numbers should be between 0 and 24 and can be for example 14.5f.
Any help would be great, thanks
float getRand() { float rnd = rand(); rnd /= RAND_MAX; return rnd * 24.0f; }
Make sure you seed the random number generator with srand before use.
srand