Simple question, I have this:
double percentMax[4] = {0.25, 0.40, 0.80, 1.50};
and I want to make a uniform_random(x, y) where:
x = percentMax[i-1]
y = percentMax[ii] <- I put double i here otherwise the forum would interpret it as italic
but If my i = 0, there is no i = -1 since 0 is the first space of the array.
I managed to do what I want but the code got pretty big, and I am pretty sure there is a simpler way hehe
double percentMax[4] = {0.25, 0.40, 0.80, 1.50};
and I want to make a uniform_random(x, y) where:
x = percentMax[i-1]
y = percentMax[ii] <- I put double i here otherwise the forum would interpret it as italic
but If my i = 0, there is no i = -1 since 0 is the first space of the array.
I managed to do what I want but the code got pretty big, and I am pretty sure there is a simpler way hehe
Last edited: