/**
 * Calculates the percentage increase between two values.
 *
 * @param initialValue The initial value.
 * @param finalValue The final value.
 * @return The percentage increase rounded to 2 decimal places.
 */
fun calculatePercentageIncrease(initialValue: Int, finalValue: Int): Double {

    val increase = finalValue - initialValue
    val percentageIncrease = (increase.toDouble() / Math.abs(initialValue)) * 100
    return percentageIncrease.round(2)
}

fun Double.round(decimals: Int): Double {
    var multiplier = 1.0
    repeat(decimals) { multiplier *= 10 }
    return kotlin.math.round(this * multiplier) / multiplier
}
/**
 * Calculates the percentage increase between two values.
 *
 * @param initialValue The initial value.
 * @param finalValue The final value.
 * @return The percentage increase rounded to 2 decimal places.
 */
fun calculatePercentageIncrease(initialValue: Int, finalValue: Int): Double {
/**
 * Calculates the percentage increase between two values.
 *
 * @param initialValue The initial value.
 * @param finalValue The final value.
 * @return The percentage increase rounded to 2 decimal places.
 */
fun calculatePercentageIncrease(initialValue: Int, finalValue: Int): Double {

    val increase = finalValue - initialValue
    val percentageIncrease = (increase.toDouble() / Math.abs(initialValue)) * 100
    return percentageIncrease.round(2)
}

fun Double.round(decimals: Int): Double {
    var multiplier = 1.0
    repeat(decimals) { multiplier *= 10 }
    return kotlin.math.round(this * multiplier) / multiplier
}