/**
 * This function calculates the Body Mass Index (BMI) for a pet.
 *
 * @param petWeight The weight of the pet in kilograms.
 * @param petHeight The height of the pet in meters.
 * @return The BMI value for the pet.
 */
fun calculatePetBmi(petWeight: Double, petHeight: Double): Double {

    val bmi = petWeight / (petHeight * petHeight)
    return bmi.round(2)
}

fun Double.round(decimals: Int): Double = "%.${decimals}f".format(this).toDouble()
/**
 * This function calculates the Body Mass Index (BMI) for a pet.
 *
 * @param petWeight The weight of the pet in kilograms.
 * @param petHeight The height of the pet in meters.
 * @return The BMI value for the pet.
 */
fun calculatePetBmi(petWeight: Double, petHeight: Double): Double {
/**
 * This function calculates the Body Mass Index (BMI) for a pet.
 *
 * @param petWeight The weight of the pet in kilograms.
 * @param petHeight The height of the pet in meters.
 * @return The BMI value for the pet.
 */
fun calculatePetBmi(petWeight: Double, petHeight: Double): Double {

    val bmi = petWeight / (petHeight * petHeight)
    return bmi.round(2)
}

fun Double.round(decimals: Int): Double = "%.${decimals}f".format(this).toDouble()