Skip to main content

List.Random

Επιστρέφει μια λίστα τυχαίων αριθμών.

Syntax

List.Random(
count as number,
optional seed as number
) as list

Remarks

Returns a list of random numbers between 0 and 1, given the number of values to generate and an optional seed value.

  • count: The number of random values to generate.
  • seed: (Optional) A numeric value used to seed the random number generator. If omitted a unique list of random numbers is generated each time you call the function. If you specify the seed value with a number every call to the function generates the same list of random numbers.

Examples

Example #1

Δημιουργήστε μια λίστα 3 τυχαίων αριθμών.

List.Random(3)

Result:

{0.992332, 0.132334, 0.023592}

Example #2

Δημιουργήστε μια λίστα 3 τυχαίων αριθμών, καθορίζοντας τιμή φύτρου.

List.Random(3, 2)

Result:

{0.883002, 0.245344, 0.723212}

Category

List.Generators