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.
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.