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