/**
 * This function calculates the volume of a geological formation given the dimensions.
 *
 * @param length The length of the formation.
 * @param width The width of the formation.
 * @param height The height of the formation.
 * @return The volume of the geological formation.
 * @throws IllegalArgumentException If any of the dimensions are negative.
 */
fun calculateVolume(length: Float, width: Float, height: Float): Float {

    if (listOf(length, width, height).any { it < 0 }) {
        throw IllegalArgumentException("Dimensions cannot be negative.")
    }
    
    return length * width * height
}
/**
 * This function calculates the volume of a geological formation given the dimensions.
 *
 * @param length The length of the formation.
 * @param width The width of the formation.
 * @param height The height of the formation.
 * @return The volume of the geological formation.
 * @throws IllegalArgumentException If any of the dimensions are negative.
 */
fun calculateVolume(length: Float, width: Float, height: Float): Float {
/**
 * This function calculates the volume of a geological formation given the dimensions.
 *
 * @param length The length of the formation.
 * @param width The width of the formation.
 * @param height The height of the formation.
 * @return The volume of the geological formation.
 * @throws IllegalArgumentException If any of the dimensions are negative.
 */
fun calculateVolume(length: Float, width: Float, height: Float): Float {

    if (listOf(length, width, height).any { it < 0 }) {
        throw IllegalArgumentException("Dimensions cannot be negative.")
    }
    
    return length * width * height
}