Skip to main content

List.Random

Returns a list of random numbers.

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

Create a list of 3 random numbers.

List.Random(3)

Result:

{0.992332, 0.132334, 0.023592}

Example #2

Create a list of 3 random numbers, specifying seed value.

List.Random(3, 2)

Result:

{0.883002, 0.245344, 0.723212}

Category

List.Generators