I'd like to have both state and stateless options. Saves the hassle of coming up with different seed values for every call when embedded in for loops and the like.
On 2010-09-17, at 3:24 PM, Giles Bathgate wrote:
> After thinking about my previous solution a rands() function that
> returns a Vector of random values is a much better approach because it
> is stateless.
> The two forms are
> So for example:
> module main()
> v = rands(1,10,5,2);
> outputs (always)
> ECHO: [7.30879, 8.28709, 1.79916, 2.09331, 4.13476]
> OpenSCAD mailing list
> [hidden email] > http://rocklinux.net/mailman/listinfo/openscad
"The future is already here. It's just not very evenly distributed" -- William Gibson
On Fri, 2010-09-17 at 15:48 -0400, Andrew Plumb wrote:
> I'd like to have both state and stateless options. Saves the hassle of coming up with different seed values for every call when embedded in for loops and the like.
In the first form you don't need a seed (it uses the system time as a
if you wanted random values in a for you would do this:
This is what made me think that the stateless thing was a good idea(TM)
as well as when you did this in the old scheme: