/**
 * Given a floating-point number and a precision value, round the number to the specified precision.
 * The precision value indicates the number of decimal places the result should have.
 *
 * @param number The floating-point number to be rounded.
 * @param precision The precision value indicating the number of decimal places the result should have.
 * @return The rounded floating-point number.
 *
 * Example:
 * roundFloatingPointNumber(3.14159, 2) -> 3.14
 */
fun roundFloatingPointNumber(number: Double, precision: Int): Double {

    // Rounding the number
    val roundedNumber = "%.${precision}f".format(number).toDouble()
    return roundedNumber
}
/**
 * Given a floating-point number and a precision value, round the number to the specified precision.
 * The precision value indicates the number of decimal places the result should have.
 *
 * @param number The floating-point number to be rounded.
 * @param precision The precision value indicating the number of decimal places the result should have.
 * @return The rounded floating-point number.
 *
 * Example:
 * roundFloatingPointNumber(3.14159, 2) -> 3.14
 */
fun roundFloatingPointNumber(number: Double, precision: Int): Double {
/**
 * Given a floating-point number and a precision value, round the number to the specified precision.
 * The precision value indicates the number of decimal places the result should have.
 *
 * @param number The floating-point number to be rounded.
 * @param precision The precision value indicating the number of decimal places the result should have.
 * @return The rounded floating-point number.
 *
 * Example:
 * roundFloatingPointNumber(3.14159, 2) -> 3.14
 */
fun roundFloatingPointNumber(number: Double, precision: Int): Double {

    // Rounding the number
    val roundedNumber = "%.${precision}f".format(number).toDouble()
    return roundedNumber
}