# Class ArrayUtil

数组工具

#### Hierarchy

- ArrayUtil

- Defined in assets/core/utils/ArrayUtil.ts:9

#####
Index

### Constructors

constructor

### Methods

combineArrays
confound
copy2DArray
fisherYatesShuffle
flattening
getRandomValueInArray
noRepeated
removeItem

## Constructors

### constructor

- new ArrayUtil(): ArrayUtil

- #### Returns ArrayUtil

## Methods

### `Static` combineArrays

- combineArrays(array1: any[], array2: any[]): any[]

- 合并数组

  #### Parameters

  - ##### array1: any[]

    目标数组1

  - ##### array2: any[]

    目标数组2

  #### Returns any[]

  - Defined in assets/core/utils/ArrayUtil.ts:96

### `Static` confound

- confound(array: []): any[]

- 混淆数组

  #### Parameters

  - ##### array: []

    目标数组

  #### Returns any[]

  - Defined in assets/core/utils/ArrayUtil.ts:63

### `Static` copy2DArray

- copy2DArray(array: any[][]): any[][]

- 复制二维数组

  #### Parameters

  - ##### array: any[][]

    目标数组

  #### Returns any[][]

  - Defined in assets/core/utils/ArrayUtil.ts:36

### `Static` fisherYatesShuffle

- fisherYatesShuffle(array: any[]): any[]

- Fisher-Yates Shuffle 随机置乱算法

  #### Parameters

  - ##### array: any[]

    目标数组

  #### Returns any[]

  - Defined in assets/core/utils/ArrayUtil.ts:48

### `Static` flattening

- flattening(array: any[]): any[]

- 数组扁平化

  #### Parameters

  - ##### array: any[]

    目标数组

  #### Returns any[]

  - Defined in assets/core/utils/ArrayUtil.ts:72

### `Static` getRandomValueInArray

- getRandomValueInArray(array: any[]): any

- 获取随机数组成员

  #### Parameters

  - ##### array: any[]

    目标数组

  #### Returns any

  - Defined in assets/core/utils/ArrayUtil.ts:105

### `Static` noRepeated

- noRepeated(arr: any[]): any[]

- 数组去重，并创建一个新数组返回

  #### Parameters

  - ##### arr: any[]

    源数组

  #### Returns any[]

  - Defined in assets/core/utils/ArrayUtil.ts:14

### `Static` removeItem

- removeItem(array: any[], item: any): void

- 删除数组中指定项

  #### Parameters

  - ##### array: any[]

  - ##### item: any

  #### Returns void

  - Defined in assets/core/utils/ArrayUtil.ts:80

Generated using TypeDoc