Hi, I am think about the probability of a number in a restricted area.
psydo-code:
float result //in a certain range (maybe between 10 and 300 (doesn't matter)) the number that I want to produce
float value // between 0 1: It says, if the result is rather big oder little
//at the moment I using:
int x = rand.nextInt(maxX - minX + 1) + minX; //but that's completely random (yes I know that randoms aren't really random but we won't care about that)
I thought about multiplying it with another random but I don’t know how I put the “value” in it, because I would like to have a linear change of the highest probability.
thx for help,
I would like to set the expectancy of the result with “value”
best regards