Function setDistinct #
收集多重集的不同元素。多维数组将在操作前转换为一维数组。
Syntax #
math.setDistinct(set)
Parameters #
| Parameter | Type | Description |
|---|---|---|
a |
Array | Matrix | 一个多重集 |
Returns #
| Type | Description |
|---|---|
| Array | Matrix | 包含多重集不同元素的集合 |
Throws #
Type | Description —- | ———–
Examples #
math.setDistinct([1, 1, 1, 2, 2, 3]) // returns [1, 2, 3]