SyntaxFix
Write A Post
Hire A Developer
Questions
Call the code with two float values, the code works in any range.
float
float rand_FloatRange(float a, float b) { return ((b - a) * ((float)rand() / RAND_MAX)) + a; }