Even simpler, depending on the speed of your random generator, you can just generate two values and average them.
Or, even more simple, where X is the result of the rng, first double y = double(1/x);
, x = y*[maximum return value of rng];
. This will weight numbers exponentially to the lower numbers.
Generate and average more values to increase the likelihood of getting values closer to center.
Of course this only works for standard bell curves distributions or "folded" versions thereof*, but with a fast generator, it might be faster and simpler than using various math functions like sqrt.
You can find all sorts of research on this for dice bell curves. In fact, Anydice.com is a good site which generates graphs for various methods of rolling dice. Though you are using an RNG, the premise is the same, as are the results. So it is a good spot for seeing the distribution before even coding it.
*Also, you can "fold" the result distribution along an axis by taking the axis and subtracting the averaged result then adding the axis. For example, you want lower values to be more common, and lets say you want 15 to be your minimum value and 35 to be your max value, a range of 20. So you generate and average together two values with a range of 20 (twice the range you want), which will give a bellcurve centered on 20 (we subtract five at the end to shift the range from 20 to 40, to 15 to 35). Take the generated numbers X and Y.
Final number,
z =(x+y)/2;// average them
If (z<20){z = (20-z)+20;}// fold if below axis
return z-5;// return value adjusted to desired range
If zero is your minimum, even better, do this instead,
z= (x+y)/2;
If (z<20){z = 20-z;}
else {z = z - 20;}
return z;