/**
 * This function calculates the latitude and longitude for each point within a tuple.
 *
 * @param tuples A tuple containing multiple points, where each point is represented by a tuple of (x, y) coordinates.
 * @return A list of tuples, where each tuple contains the latitude and longitude for each point.
 *
 * Example:
 * points = listOf(Pair(34.0522, -118.2437), Pair(40.7128, -74.0060))
 * getLatitudeLongitude(points) returns listOf("34.0522° N" to "118.2437° W", "40.7128° N" to "74.0060° W")
 */
fun getLatitudeLongitude(tuples: List<Pair<Double, Double>>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()
    for (point in tuples) {
        // Calculate latitude and longitude
        val latitude = "${Math.abs(point.first)}° N"
        val longitude = "${Math.abs(point.second)}° W"
        
        // Add the formatted latitude and longitude to the result
        result.add(latitude to longitude)
    }
    return result
}
/**
 * This function calculates the latitude and longitude for each point within a tuple.
 *
 * @param tuples A tuple containing multiple points, where each point is represented by a tuple of (x, y) coordinates.
 * @return A list of tuples, where each tuple contains the latitude and longitude for each point.
 *
 * Example:
 * points = listOf(Pair(34.0522, -118.2437), Pair(40.7128, -74.0060))
 * getLatitudeLongitude(points) returns listOf("34.0522° N" to "118.2437° W", "40.7128° N" to "74.0060° W")
 */
fun getLatitudeLongitude(tuples: List<Pair<Double, Double>>): List<Pair<String, String>> {
/**
 * This function calculates the latitude and longitude for each point within a tuple.
 *
 * @param tuples A tuple containing multiple points, where each point is represented by a tuple of (x, y) coordinates.
 * @return A list of tuples, where each tuple contains the latitude and longitude for each point.
 *
 * Example:
 * points = listOf(Pair(34.0522, -118.2437), Pair(40.7128, -74.0060))
 * getLatitudeLongitude(points) returns listOf("34.0522° N" to "118.2437° W", "40.7128° N" to "74.0060° W")
 */
fun getLatitudeLongitude(tuples: List<Pair<Double, Double>>): List<Pair<String, String>> {

    val result = mutableListOf<Pair<String, String>>()
    for (point in tuples) {
        // Calculate latitude and longitude
        val latitude = "${Math.abs(point.first)}° N"
        val longitude = "${Math.abs(point.second)}° W"
        
        // Add the formatted latitude and longitude to the result
        result.add(latitude to longitude)
    }
    return result
}