I am using an internal language in my company and they only have Random() that returns a float between 0 and 1.
I need to port a piece of C++ code that use rand():
int b = rand() % (i+1); I looked at the docs, but not sure how I can use my Random() to generate a number between 0 and i+1 which is what the above code does, right?
I tried multiplying i+1 with Random() but didn't get the same results, that's why I am not sure if what I am doing is correct.
I expect difference between the results due to different random functions, but still I want to be sure I am translating it correctly.