3 ms·
Wait, wouldn't this result in the opposite of what you want? You want to shift the distribution out, not crowd the center, so you probably want to square your r
by arijun 1y ago
Wait, wouldn't this result in the opposite of what you want? You want to shift the distribution out, not crowd the center, so you probably want to square your random instead.
- hatthew 1y agoassuming random() returns values 0<=r<=1, sqrt will shift the distribution outward
- Jtsummers 1y agoSquaring numbers in (0,1) makes them smaller, pulling the random radius closer to center. As an example consider 0.9. Squaring it gets 0.81 vs 0.949 taking the square root.
- arijun 1y agoOh yes all of you are right. In my defense, I am stupid.
- hhmc 1y agoBecause the numbers are less than 1 sqrt pulls them towards 1 (the edge)
- deleted 1y ago[deleted]