Yeah, the random() function is a bit tricky with its upper and lower bounds. Keep in mind you have floor() and ceil(), which will either truncate, or truncate and add one.
Here's what you get from int, floor, and ceil:
ceil(5.6) gives 6
floor(5.6) gives 5
int(5.6) gives 5
That's right, the int function does not round.
Keep this all in mind, and in some cases, consider using the choose() function to randomly choose between a fixed set of parameters.