/**
 * This function takes a list of geographic coordinates in the format [latitude, longitude]
 * and a scale factor. It multiplies each coordinate by the scale factor and returns the modified coordinates.
 *
 * @param coordinates List of geographic coordinates in the format [latitude, longitude]
 * @param scale Scale factor to multiply the coordinates
 * @return List of modified coordinates after scaling
 *
 * Example:
 * modifyElements(listOf(listOf(44.9778, -93.2650), listOf(51.5074, -0.1278), listOf(35.6895, 139.6917)), 2.0)
 * // Output: [[89.9556, -186.53], [103.0148, -0.2556], [71.379, 279.3834]]
 */
fun modifyElements(coordinates: List<List<Double>>, scale: Double): List<List<Double>> {

    val modifiedCoordinates = mutableListOf<List<Double>>()
    for (coordinate in coordinates) {
        val latitude = coordinate[0]
        val longitude = coordinate[1]
        val newLatitude = latitude * scale
        val newLongitude = longitude * scale
        modifiedCoordinates.add(listOf(newLatitude, newLongitude))
    }
    return modifiedCoordinates
}
/**
 * This function takes a list of geographic coordinates in the format [latitude, longitude]
 * and a scale factor. It multiplies each coordinate by the scale factor and returns the modified coordinates.
 *
 * @param coordinates List of geographic coordinates in the format [latitude, longitude]
 * @param scale Scale factor to multiply the coordinates
 * @return List of modified coordinates after scaling
 *
 * Example:
 * modifyElements(listOf(listOf(44.9778, -93.2650), listOf(51.5074, -0.1278), listOf(35.6895, 139.6917)), 2.0)
 * // Output: [[89.9556, -186.53], [103.0148, -0.2556], [71.379, 279.3834]]
 */
fun modifyElements(coordinates: List<List<Double>>, scale: Double): List<List<Double>> {
/**
 * This function takes a list of geographic coordinates in the format [latitude, longitude]
 * and a scale factor. It multiplies each coordinate by the scale factor and returns the modified coordinates.
 *
 * @param coordinates List of geographic coordinates in the format [latitude, longitude]
 * @param scale Scale factor to multiply the coordinates
 * @return List of modified coordinates after scaling
 *
 * Example:
 * modifyElements(listOf(listOf(44.9778, -93.2650), listOf(51.5074, -0.1278), listOf(35.6895, 139.6917)), 2.0)
 * // Output: [[89.9556, -186.53], [103.0148, -0.2556], [71.379, 279.3834]]
 */
fun modifyElements(coordinates: List<List<Double>>, scale: Double): List<List<Double>> {

    val modifiedCoordinates = mutableListOf<List<Double>>()
    for (coordinate in coordinates) {
        val latitude = coordinate[0]
        val longitude = coordinate[1]
        val newLatitude = latitude * scale
        val newLongitude = longitude * scale
        modifiedCoordinates.add(listOf(newLatitude, newLongitude))
    }
    return modifiedCoordinates
}