/**
 * Calculates the correct exposure value for a photograph.
 *
 * @param aperture The aperture value of the camera.
 * @param shutterSpeed The shutter speed value of the camera.
 * @param iso The ISO value of the camera.
 * @return The calculated exposure value.
 */
fun calculateExposure(aperture: Double, shutterSpeed: Double, iso: Int): Double? {

    if (aperture <= 0 || shutterSpeed <= 0 || iso <= 0) {
        return null
    }

    if (aperture > 22 || shutterSpeed > 4000 || iso > 6400) {
        return null
    }

    if (aperture > 5.6 && shutterSpeed < 1.0 / 60) {
        return null
    }

    if (iso > 1600) {
        return null
    }

    return aperture * shutterSpeed / iso
}
/**
 * Calculates the correct exposure value for a photograph.
 *
 * @param aperture The aperture value of the camera.
 * @param shutterSpeed The shutter speed value of the camera.
 * @param iso The ISO value of the camera.
 * @return The calculated exposure value.
 */
fun calculateExposure(aperture: Double, shutterSpeed: Double, iso: Int): Double? {
/**
 * Calculates the correct exposure value for a photograph.
 *
 * @param aperture The aperture value of the camera.
 * @param shutterSpeed The shutter speed value of the camera.
 * @param iso The ISO value of the camera.
 * @return The calculated exposure value.
 */
fun calculateExposure(aperture: Double, shutterSpeed: Double, iso: Int): Double? {

    if (aperture <= 0 || shutterSpeed <= 0 || iso <= 0) {
        return null
    }

    if (aperture > 22 || shutterSpeed > 4000 || iso > 6400) {
        return null
    }

    if (aperture > 5.6 && shutterSpeed < 1.0 / 60) {
        return null
    }

    if (iso > 1600) {
        return null
    }

    return aperture * shutterSpeed / iso
}