Calculates the intersection of two sets.