Shuffle Int Array

Callable
ShuffleIntArray

Shuffles an integer array in place using Fisher-Yates. Use Seed=-1 for a random shuffle or any other value for a reproducible one.

Type: Callable (has execution pins)
Category: Fortuna|Array & Collection
Keywords: array & collection

Inputs

NameTypeDefaultDescription
ArrayTArray<int32>Array parameter
Seedint32-1Seed parameter

Outputs

NameTypeDescription
ShuffledArrayTArray<int32>Array output

Example Use Cases

Example 1

Randomize card draw order from a deck array.

Example 2

Reproducibly shuffle a spawn index list with a session seed.