/**
 * This function calculates the total duration of a note based on its length and additional modifiers.
 *
 * @param noteLength The length of the note in seconds.
 * @param isDotted True if the note is dotted, False otherwise.
 * @param isTriplet True if the note is a triplet, False otherwise.
 * @return The total duration of the note in seconds.
 */
fun calculateNoteDuration(noteLength: Double, isDotted: Boolean, isTriplet: Boolean): Double {

    // Complete the if statement to calculate the duration of the note.
    // Use ternary operators to handle different cases based on the given arguments.
    // Use the complex conjugate and absolute value functions to perform intermediate calculations.

    return noteLength + noteLength * (if (isDotted) 1.0 / 2 else 0.0) + if (isTriplet) -noteLength / 3 else 0.0
}
/**
 * This function calculates the total duration of a note based on its length and additional modifiers.
 *
 * @param noteLength The length of the note in seconds.
 * @param isDotted True if the note is dotted, False otherwise.
 * @param isTriplet True if the note is a triplet, False otherwise.
 * @return The total duration of the note in seconds.
 */
fun calculateNoteDuration(noteLength: Double, isDotted: Boolean, isTriplet: Boolean): Double {
/**
 * This function calculates the total duration of a note based on its length and additional modifiers.
 *
 * @param noteLength The length of the note in seconds.
 * @param isDotted True if the note is dotted, False otherwise.
 * @param isTriplet True if the note is a triplet, False otherwise.
 * @return The total duration of the note in seconds.
 */
fun calculateNoteDuration(noteLength: Double, isDotted: Boolean, isTriplet: Boolean): Double {

    // Complete the if statement to calculate the duration of the note.
    // Use ternary operators to handle different cases based on the given arguments.
    // Use the complex conjugate and absolute value functions to perform intermediate calculations.

    return noteLength + noteLength * (if (isDotted) 1.0 / 2 else 0.0) + if (isTriplet) -noteLength / 3 else 0.0
}