函数 setIntersect #

创建两个(多)集合的交集。多维数组将在操作前转换为一维数组。

Syntax #

math.setIntersect(set1, set2)

Parameters #

Parameter Type Description
a1 Array | Matrix 一个(多)集合
a2 Array | Matrix 一个(多)集合

Returns #

Type Description
Array | Matrix 两个(多)集合的交集

Throws #

Type | Description —- | ———–

Examples #

math.setIntersect([1, 2, 3, 4], [3, 4, 5, 6])            // returns [3, 4]
math.setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])    // returns [3, 4]

另请参阅 #

setUnion, setDifference

Fork me on GitHub