函数 setUnion #
创建两个(多)集的并集。多维数组将在操作前转换为一维数组。
Syntax #
math.setUnion(set1, set2)
Parameters #
| Parameter | Type | Description |
|---|---|---|
a1 |
Array | Matrix | 一个(多)集合 |
a2 |
Array | Matrix | 一个(多)集合 |
Returns #
| Type | Description |
|---|---|
| Array | Matrix | 两个(多)集的并集 |
Throws #
Type | Description —- | ———–
Examples #
math.setUnion([1, 2, 3, 4], [3, 4, 5, 6]) // returns [1, 2, 3, 4, 5, 6]
math.setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]]) // returns [1, 2, 3, 4, 5, 6]