discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

random doesn't work inside loop

U
ufomorace
Thu, Sep 17, 2015 3:09 AM

i want to have two sets of random numbers, where the random numbers can
change in a loop so child groups share the same attributes but have
different attributes. there are easy workarounds for this, but this code
essentially returns 1's:

--
View this message in context: http://forum.openscad.org/random-doesn-t-work-inside-loop-tp13864.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

i want to have two sets of random numbers, where the random numbers can change in a loop so child groups share the same attributes but have different attributes. there are easy workarounds for this, but this code essentially returns 1's: -- View this message in context: http://forum.openscad.org/random-doesn-t-work-inside-loop-tp13864.html Sent from the OpenSCAD mailing list archive at Nabble.com.
U
ufomorace
Thu, Sep 17, 2015 3:17 AM

oh sorry it does work, i had to change the range of the second seed variable
higher than 1. it's an integer apparently. i figure it's range is 0 - 65534

--
View this message in context: http://forum.openscad.org/random-doesn-t-work-inside-loop-tp13864p13865.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

oh sorry it does work, i had to change the range of the second seed variable higher than 1. it's an integer apparently. i figure it's range is 0 - 65534 -- View this message in context: http://forum.openscad.org/random-doesn-t-work-inside-loop-tp13864p13865.html Sent from the OpenSCAD mailing list archive at Nabble.com.