Remix.run Logo
arijun a day 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.

Jtsummers a day ago | parent | next [-]

Squaring 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 a day ago | parent [-]

Oh yes all of you are right. In my defense, I am stupid.

a day ago | parent | prev | next [-]
[deleted]
hhmc a day ago | parent | prev | next [-]

Because the numbers are less than 1 sqrt pulls them towards 1 (the edge)

hatthew a day ago | parent | prev [-]

assuming random() returns values 0<=r<=1, sqrt will shift the distribution outward