/**
 * This function calculates the total price after applying a discount to the original price.
 *
 * @param discount The discount percentage as a decimal number.
 * @param price The original price before applying the discount.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(discount: Float, price: Float): Float {

    val epsilon = 0.0001f  // Define the epsilon value for floating-point comparison

    val totalPrice = if (Math.abs(discount) > epsilon) {
        price - (price * discount)
    } else {
        price
    }

    return totalPrice
}
/**
 * This function calculates the total price after applying a discount to the original price.
 *
 * @param discount The discount percentage as a decimal number.
 * @param price The original price before applying the discount.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(discount: Float, price: Float): Float {
/**
 * This function calculates the total price after applying a discount to the original price.
 *
 * @param discount The discount percentage as a decimal number.
 * @param price The original price before applying the discount.
 * @return The total price after applying the discount.
 */
fun calculateTotalPrice(discount: Float, price: Float): Float {

    val epsilon = 0.0001f  // Define the epsilon value for floating-point comparison

    val totalPrice = if (Math.abs(discount) > epsilon) {
        price - (price * discount)
    } else {
        price
    }

    return totalPrice
}