7.1  arrays.inc

This file contains macros for manipulating arrays.

Rand_Array_Item(Array, Stream). Randomly Picks an item from a 1D array.
Parameters:

Resize_Array(Array, NewSize). Resize a 1D array, retaining its contents.
Parameters:

Reverse_Array(Array). Reverses the order of items in a 1D array.
Parameters:

Sort_Compare(Array, IdxA, IdxB). This macro is used by the Sort_Array() and Sort_Partial_Array() macros. The given macro works for 1D arrays of floats, but you can redefine it in your scene file for more complex situations, arrays of vectors or multidimensional arrays for example. Just make sure your macro returns true if the item at IdxA < the item at IdxB, and otherwise returns false.
Parameters:

Sort_Swap_Data(Array, IdxA, IdxB). This macro is used by the Sort_Array() and Sort_Partial_Array() macros. The given macro works for 1D arrays and floats only, but you can redefine it in your scene file for more complex situations, arrays of vectors or multidimensional arrays for example. The only requirement is that your macro swaps the data at IdxA with that at IdxB.
Parameters:

Sort_Array(Array). This macro sorts a 1D array of floats, though you can redefine the Sort_Compare() and Sort_Swap_Data() macros to handle multidimensional arrays and other data types.
Parameters:

Sort_Partial_Array(Array, FirstInd, LastInd). This macro is like Sort_Array(), but sorts a specific range of an array instead of the whole array.
Parameters: