/**
 * This function calculates the required amount of fabric for a fashion designer to create a garment.
 *
 * @param width The width of the fabric in meters.
 * @param length The length of the fabric in meters.
 * @param shiftFactor The shift factor to apply when calculating the fabric amount. Defaults to 1.
 * @return The total fabric amount needed in meters.
 */
fun calculateFabricAmount(width: Float, length: Float, shiftFactor: Int = 1): Float {

    // Calculate the original fabric amount based on width and length
    val originalAmount = width * length

    // Shift the original amount using both left and right shift operators
    val shiftedAmount1 = originalAmount.toInt() shl shiftFactor
    val shiftedAmount2 = originalAmount.toInt() shr shiftFactor

    // Return the largest shifted amount as the final fabric amount
    return maxOf(shiftedAmount1.toFloat(), shiftedAmount2.toFloat())
}
/**
 * This function calculates the required amount of fabric for a fashion designer to create a garment.
 *
 * @param width The width of the fabric in meters.
 * @param length The length of the fabric in meters.
 * @param shiftFactor The shift factor to apply when calculating the fabric amount. Defaults to 1.
 * @return The total fabric amount needed in meters.
 */
fun calculateFabricAmount(width: Float, length: Float, shiftFactor: Int = 1): Float {
/**
 * This function calculates the required amount of fabric for a fashion designer to create a garment.
 *
 * @param width The width of the fabric in meters.
 * @param length The length of the fabric in meters.
 * @param shiftFactor The shift factor to apply when calculating the fabric amount. Defaults to 1.
 * @return The total fabric amount needed in meters.
 */
fun calculateFabricAmount(width: Float, length: Float, shiftFactor: Int = 1): Float {

    // Calculate the original fabric amount based on width and length
    val originalAmount = width * length

    // Shift the original amount using both left and right shift operators
    val shiftedAmount1 = originalAmount.toInt() shl shiftFactor
    val shiftedAmount2 = originalAmount.toInt() shr shiftFactor

    // Return the largest shifted amount as the final fabric amount
    return maxOf(shiftedAmount1.toFloat(), shiftedAmount2.toFloat())
}