4 ms·
Thanks for the reply. I came up with: f(x) = (sin((pi * x) - (pi / 2)) + 1) / 2 where x is between 0 and 1 I'm a collector of randomness functions for games.
by ooqr 10y ago
Thanks for the reply.
I came up with:
f(x) = (sin((pi * x) - (pi / 2)) + 1) / 2
where x is between 0 and 1
I'm a collector of randomness functions for games. Weighted, gaussian, linear, etc. This sinusoidal randomness will be handy! Thanks for the inspiration.