/** * Returns the last element of an array. */ export declare function last(arr: T[]): T; /** * Gets a single random element from a given array. */ export declare function randElement(arr: T[]): T; /** * Performs a Fisher-Yates shuffle on an array (in place) and returns it. */ export declare function shuffle>(arr: T): T; /** * Makes a copy of an array, shuffles it, and returns it. * The original array is untouched. */ export declare function shuffleCopy>(arr: T): T; /** * Moves the first element of the array to the end, moving all other elements up one position. * This modifies the original array. */ export declare function rotateForward>(arr: T): T; /** * Moves the last element of the array to the front, moving all other elements back one position. * This modifies the original array. */ export declare function rotateBackward>(arr: T): T; /** * Gets a value from an array, looping the index if it is negative or past the array length. */ export declare function getLoopedValue(arr: T[], index: number): T;