/**
 * This function rounds a given number to the specified precision.
 *
 * @param number The number to be rounded.
 * @param precision The number of decimal places to round to.
 * @return The rounded number.
 */
fun roundToPrecision(number: Double, precision: Int): Double {

    // Implementing rounding to the specified precision
    val roundedNumber = "%.${precision}f".format(number)
    return roundedNumber.toDouble()
}
/**
 * This function rounds a given number to the specified precision.
 *
 * @param number The number to be rounded.
 * @param precision The number of decimal places to round to.
 * @return The rounded number.
 */
fun roundToPrecision(number: Double, precision: Int): Double {
/**
 * This function rounds a given number to the specified precision.
 *
 * @param number The number to be rounded.
 * @param precision The number of decimal places to round to.
 * @return The rounded number.
 */
fun roundToPrecision(number: Double, precision: Int): Double {

    // Implementing rounding to the specified precision
    val roundedNumber = "%.${precision}f".format(number)
    return roundedNumber.toDouble()
}