@name Sort the damn numbers!
@persist [Data Sorted]:array [Index Smallest]:number
@model models/hunter/triangles/trapezium3x3x1.mdl

for(Index = 1,10) { # Generating 10 random numbers.
    Data[Index,number] = randint(0,1000)
}

while(Data:count()) {
    Sorted:pushNumber(Data[Data:minIndex(),number])
    Data:removeNumber(Data:minIndex())
    print(Sorted[Sorted:count(),number]:toString())
}
    
# What is that thing above?
#
# What it does is push the lowest number of Data into Sorted while removing the entry of the lowest number
# of the Data array, so you don't encounter it an infinite time.
# It stops once the Data array is empty.
