Fixing random function. arc4random_uniform takes and outputs an unsigned 32-bit integer, therefore we shouldn't rely on using long long. It was possible to choose a big value for lower bound and have random hang infinitely.
Fixing random function.
arc4random_uniform takes and outputs an unsigned 32-bit integer, therefore we shouldn't rely on using long long. It was possible to choose a big value for lower bound and have random hang infinitely.

Additionally, error checking should be done to satisfy if upperBound >= lowerBound (I did it inclusively).

Lastly, a loop is not necessary to use to keep the output in a certain range; just take advantage of the upper bound argument of arc4random_uniform. Found bug thanks to Wsign-conversion

carabina/DDMathParser,mrackwitz/DDMathParser,davedelong/DDMathParser,davedelong/DDMathParser,mrackwitz/DDMathParser,carabina/DDMathParser