For example, if your "balance" stat is 65% and your damage range is 10-20, then you are most likely to do 17 damage (65% of the way between 10 and 20).
The roadblock is that i don't know how to calculate a normal distribution curve. I found the algorithm on wikipedia.
but was forced to remember that despite being a CS major i don't know shit about maths. To date the most advanced math course i've taken was basic statistics. At present, my equation (with mu hardcoded as 7 and sigma hardcoded as 1) looks like this.
Code: Select all
double equation (int x)
int exponent = -1 * (((x - 7) ^ 2) / 2 * (1 ^ 2));
int blah = 1 / (1 * sqrt(2 * 3.14));
return blah ^ exponent;
But it doesn't work. Is it because i oversimplified pi?