/**
 * Converts Polar coordinates to Cartesian coordinates
 */
fun complexPolarConversion(polarCoords: Pair<Double, Double>): Pair<Double, Double> {

    // Extracting the magnitude and angle from the polarCoords
    val (magnitude, angle) = polarCoords

    // Converting angle from degrees to radians
    val angleRad = Math.toRadians(angle)

    // Calculating the real and imaginary parts using the magnitude and angle
    val real = magnitude * Math.cos(angleRad)
    val imaginary = magnitude * Math.sin(angleRad)

    // Returning the Cartesian coordinates as a Pair of (real, imaginary) parts
    return Pair(real, imaginary)
}
/**
 * Converts Polar coordinates to Cartesian coordinates
 */
fun complexPolarConversion(polarCoords: Pair<Double, Double>): Pair<Double, Double> {
/**
 * Converts Polar coordinates to Cartesian coordinates
 */
fun complexPolarConversion(polarCoords: Pair<Double, Double>): Pair<Double, Double> {

    // Extracting the magnitude and angle from the polarCoords
    val (magnitude, angle) = polarCoords

    // Converting angle from degrees to radians
    val angleRad = Math.toRadians(angle)

    // Calculating the real and imaginary parts using the magnitude and angle
    val real = magnitude * Math.cos(angleRad)
    val imaginary = magnitude * Math.sin(angleRad)

    // Returning the Cartesian coordinates as a Pair of (real, imaginary) parts
    return Pair(real, imaginary)
}