/**
 * Imagine you are a geologist studying earthquake data. You have two sets of earthquake magnitudes recorded from two different regions.
 * Your task is to create a function that takes two sets as input and returns a new set containing the intersecting elements present in both sets.
 *
 * @param set1 The first set of earthquake magnitudes.
 * @param set2 The second set of earthquake magnitudes.
 * @return A new set containing the intersecting elements found in both sets.
 *
 * Example:
 * val set1 = setOf(3.2, 4.5, 5.1, 6.0)
 * val set2 = setOf(4.5, 5.1, 6.0, 7.3)
 * addElementsToSet(set1, set2) // Output: [4.5, 5.1, 6.0]
 */
fun addElementsToSet(set1: Set<Double>, set2: Set<Double>): Set<Double> {

    // Use the intersect method to get the common elements of both sets
    return set1.intersect(set2)
}
/**
 * Imagine you are a geologist studying earthquake data. You have two sets of earthquake magnitudes recorded from two different regions.
 * Your task is to create a function that takes two sets as input and returns a new set containing the intersecting elements present in both sets.
 *
 * @param set1 The first set of earthquake magnitudes.
 * @param set2 The second set of earthquake magnitudes.
 * @return A new set containing the intersecting elements found in both sets.
 *
 * Example:
 * val set1 = setOf(3.2, 4.5, 5.1, 6.0)
 * val set2 = setOf(4.5, 5.1, 6.0, 7.3)
 * addElementsToSet(set1, set2) // Output: [4.5, 5.1, 6.0]
 */
fun addElementsToSet(set1: Set<Double>, set2: Set<Double>): Set<Double> {
/**
 * Imagine you are a geologist studying earthquake data. You have two sets of earthquake magnitudes recorded from two different regions.
 * Your task is to create a function that takes two sets as input and returns a new set containing the intersecting elements present in both sets.
 *
 * @param set1 The first set of earthquake magnitudes.
 * @param set2 The second set of earthquake magnitudes.
 * @return A new set containing the intersecting elements found in both sets.
 *
 * Example:
 * val set1 = setOf(3.2, 4.5, 5.1, 6.0)
 * val set2 = setOf(4.5, 5.1, 6.0, 7.3)
 * addElementsToSet(set1, set2) // Output: [4.5, 5.1, 6.0]
 */
fun addElementsToSet(set1: Set<Double>, set2: Set<Double>): Set<Double> {

    // Use the intersect method to get the common elements of both sets
    return set1.intersect(set2)
}