/**
 * This function takes two complex numbers and returns their sum.
 *
 * @param real1 The real part of the first complex number.
 * @param imaginary1 The imaginary part of the first complex number.
 * @param real2 The real part of the second complex number.
 * @param imaginary2 The imaginary part of the second complex number.
 * @return A Pair representing the sum of the complex numbers.
 */
fun complexNumberAddition(real1: Double, imaginary1: Double, real2: Double, imaginary2: Double): Pair<Double, Double> {

    // Complex number addition using addition assignment operator
    val newReal = real1 + real2
    val newImaginary = imaginary1 + imaginary2

    return Pair(newReal, newImaginary)
}
/**
 * This function takes two complex numbers and returns their sum.
 *
 * @param real1 The real part of the first complex number.
 * @param imaginary1 The imaginary part of the first complex number.
 * @param real2 The real part of the second complex number.
 * @param imaginary2 The imaginary part of the second complex number.
 * @return A Pair representing the sum of the complex numbers.
 */
fun complexNumberAddition(real1: Double, imaginary1: Double, real2: Double, imaginary2: Double): Pair<Double, Double> {
/**
 * This function takes two complex numbers and returns their sum.
 *
 * @param real1 The real part of the first complex number.
 * @param imaginary1 The imaginary part of the first complex number.
 * @param real2 The real part of the second complex number.
 * @param imaginary2 The imaginary part of the second complex number.
 * @return A Pair representing the sum of the complex numbers.
 */
fun complexNumberAddition(real1: Double, imaginary1: Double, real2: Double, imaginary2: Double): Pair<Double, Double> {

    // Complex number addition using addition assignment operator
    val newReal = real1 + real2
    val newImaginary = imaginary1 + imaginary2

    return Pair(newReal, newImaginary)
}