/**
 * This function takes in the current coordinates of a spacecraft and a list of new coordinates.
 * It modifies the current coordinates using slicing and returns the updated coordinates.
 *
 * @param x The current x-coordinate of the spacecraft.
 * @param y The current y-coordinate of the spacecraft.
 * @param z The current z-coordinate of the spacecraft.
 * @param newCoords List of new coordinates to replace the current ones. Should have length 3.
 * @return A tuple containing the updated x, y, and z coordinates of the spacecraft.
 */
fun updateCoordinates(x: Float, y: Float, z: Float, newCoords: List<Float>): Triple<Float, Float, Float> {

    // Update the coordinates using slicing
    val updatedCoords = Triple(newCoords[0], newCoords[1], newCoords[2])

    // Return the updated coordinates as a tuple
    return updatedCoords
}
/**
 * This function takes in the current coordinates of a spacecraft and a list of new coordinates.
 * It modifies the current coordinates using slicing and returns the updated coordinates.
 *
 * @param x The current x-coordinate of the spacecraft.
 * @param y The current y-coordinate of the spacecraft.
 * @param z The current z-coordinate of the spacecraft.
 * @param newCoords List of new coordinates to replace the current ones. Should have length 3.
 * @return A tuple containing the updated x, y, and z coordinates of the spacecraft.
 */
fun updateCoordinates(x: Float, y: Float, z: Float, newCoords: List<Float>): Triple<Float, Float, Float> {
/**
 * This function takes in the current coordinates of a spacecraft and a list of new coordinates.
 * It modifies the current coordinates using slicing and returns the updated coordinates.
 *
 * @param x The current x-coordinate of the spacecraft.
 * @param y The current y-coordinate of the spacecraft.
 * @param z The current z-coordinate of the spacecraft.
 * @param newCoords List of new coordinates to replace the current ones. Should have length 3.
 * @return A tuple containing the updated x, y, and z coordinates of the spacecraft.
 */
fun updateCoordinates(x: Float, y: Float, z: Float, newCoords: List<Float>): Triple<Float, Float, Float> {

    // Update the coordinates using slicing
    val updatedCoords = Triple(newCoords[0], newCoords[1], newCoords[2])

    // Return the updated coordinates as a tuple
    return updatedCoords
}