/**
 * Calculate the required focal length for a given aperture and distance.
 *
 * @param aperture the desired aperture value.
 * @param distance the distance to the subject in meters.
 * @return the calculated focal length.
 */
fun computeFocalLength(aperture: Double, distance: Double): Double {

    return when {
        aperture < 1.8 -> if (distance > 10) 85.0 else 50.0
        aperture in 1.8..2.8 -> if (distance > 20) 135.0 else 85.0
        aperture in 2.8..4.0 -> if (distance > 30) 200.0 else 135.0
        else -> 0.0 // Handle other cases as needed
    }
}
/**
 * Calculate the required focal length for a given aperture and distance.
 *
 * @param aperture the desired aperture value.
 * @param distance the distance to the subject in meters.
 * @return the calculated focal length.
 */
fun computeFocalLength(aperture: Double, distance: Double): Double {
/**
 * Calculate the required focal length for a given aperture and distance.
 *
 * @param aperture the desired aperture value.
 * @param distance the distance to the subject in meters.
 * @return the calculated focal length.
 */
fun computeFocalLength(aperture: Double, distance: Double): Double {

    return when {
        aperture < 1.8 -> if (distance > 10) 85.0 else 50.0
        aperture in 1.8..2.8 -> if (distance > 20) 135.0 else 85.0
        aperture in 2.8..4.0 -> if (distance > 30) 200.0 else 135.0
        else -> 0.0 // Handle other cases as needed
    }
}