discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

rands vector is sorted

K
KoenigDickBauch
Wed, Jan 21, 2015 1:38 PM

Rands gives a vector with sorted values. Is this wanted?

https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Mathematical_Functions#rands

OpenSCAD version 2014.12.09

--
View this message in context: http://forum.openscad.org/rands-vector-is-sorted-tp11173.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Rands gives a vector with sorted values. Is this wanted? https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Mathematical_Functions#rands OpenSCAD version 2014.12.09 -- View this message in context: http://forum.openscad.org/rands-vector-is-sorted-tp11173.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Wed, Jan 21, 2015 7:23 PM

On 01/21/2015 02:38 PM, KoenigDickBauch wrote:

Rands gives a vector with sorted values. Is this wanted?

Could you please give some more details? I'm not seeing that
with the latest snapshot on Linux:

Running "echo(rands(1, 10, 10));" multiple times gives:

ECHO: [2.08048, 3.45319, 1.36751, 4.80183, 4.0744, 9.39971, 2.11607, 3.08498, 9.07068, 6.88254]
ECHO: [4.95086, 3.34167, 2.69303, 3.85545, 9.16911, 3.89293, 9.69564, 5.41827, 2.59807, 1.12824]
ECHO: [8.63941, 2.48244, 2.82807, 2.39066, 2.08937, 9.30696, 7.0541, 1.27273, 8.42552, 6.06204]
ECHO: [9.32437, 6.14479, 9.30244, 2.38059, 8.89836, 7.00739, 9.3399, 8.28212, 7.09716, 7.86093]
ECHO: [5.85335, 5.07632, 2.85821, 1.54428, 7.20729, 1.94257, 2.59274, 7.59775, 4.32569, 3.2447]

ciao,
Torsten.

On 01/21/2015 02:38 PM, KoenigDickBauch wrote: > Rands gives a vector with sorted values. Is this wanted? > Could you please give some more details? I'm not seeing that with the latest snapshot on Linux: Running "echo(rands(1, 10, 10));" multiple times gives: ECHO: [2.08048, 3.45319, 1.36751, 4.80183, 4.0744, 9.39971, 2.11607, 3.08498, 9.07068, 6.88254] ECHO: [4.95086, 3.34167, 2.69303, 3.85545, 9.16911, 3.89293, 9.69564, 5.41827, 2.59807, 1.12824] ECHO: [8.63941, 2.48244, 2.82807, 2.39066, 2.08937, 9.30696, 7.0541, 1.27273, 8.42552, 6.06204] ECHO: [9.32437, 6.14479, 9.30244, 2.38059, 8.89836, 7.00739, 9.3399, 8.28212, 7.09716, 7.86093] ECHO: [5.85335, 5.07632, 2.85821, 1.54428, 7.20729, 1.94257, 2.59274, 7.59775, 4.32569, 3.2447] ciao, Torsten.