Weighted Random number about a Center - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Utilities (https://qb64phoenix.com/forum/forumdisplay.php?fid=8) +---- Thread: Weighted Random number about a Center (/showthread.php?tid=1410) |
Weighted Random number about a Center - bplus - 01-20-2023 This is from James D Jarvis, a handy way to make random numbers centered and dense around a center point andtapering off within a range. Here my test code I made for this, one for Integers and one for floats, single is assumed Type. CW stands for Center Weight: Code: (Select All) _Title "rndCWI function" 'b+ 2023-01-20 Just drop the I from rndCWI to test the float version. RE: Weighted Random number about a Center - James D Jarvis - 01-20-2023 Distribution curves, inspiring math nerds for generations. RE: Weighted Random number about a Center - dcromley - 01-25-2023 This reminded me of my "Bates distribution" program in my files, which I ported: (Very good in QB64.) Code: (Select All) _Title "Bates distribution" ' dcromley RE: Weighted Random number about a Center - bplus - 01-25-2023 Yeah, that's a nerdy looking thing |