/**
 * Given a list of complex numbers represented as points in the form (x, y), this function computes and returns
 * the polar coordinates (r, theta) for each point.
 *
 * @param points a list of complex numbers represented as points in the form (x, y)
 * @return a list of pairs representing the polar coordinates (r, theta) for each point
 */
fun generatePolarCoordinates(points: List<Pair<Double, Double>>): List<Pair<Double, Double>> {

    val polarCoords = mutableListOf<Pair<Double, Double>>()
    for (point in points) {
        val (x, y) = point
        val r = Math.sqrt(x * x + y * y)
        val theta = Math.atan2(y, x)
        polarCoords.add(Pair(r, theta))
    }
    return polarCoords
}
/**
 * Given a list of complex numbers represented as points in the form (x, y), this function computes and returns
 * the polar coordinates (r, theta) for each point.
 *
 * @param points a list of complex numbers represented as points in the form (x, y)
 * @return a list of pairs representing the polar coordinates (r, theta) for each point
 */
fun generatePolarCoordinates(points: List<Pair<Double, Double>>): List<Pair<Double, Double>> {
/**
 * Given a list of complex numbers represented as points in the form (x, y), this function computes and returns
 * the polar coordinates (r, theta) for each point.
 *
 * @param points a list of complex numbers represented as points in the form (x, y)
 * @return a list of pairs representing the polar coordinates (r, theta) for each point
 */
fun generatePolarCoordinates(points: List<Pair<Double, Double>>): List<Pair<Double, Double>> {

    val polarCoords = mutableListOf<Pair<Double, Double>>()
    for (point in points) {
        val (x, y) = point
        val r = Math.sqrt(x * x + y * y)
        val theta = Math.atan2(y, x)
        polarCoords.add(Pair(r, theta))
    }
    return polarCoords
}