/**
 * Calculate the final velocity of an aircraft using the unconditioned ternary operator and repetition.
 *
 * @param initialVelocity The initial velocity of the aircraft.
 * @param acceleration The acceleration of the aircraft.
 * @param time The time at which the final velocity is to be calculated.
 * @return The final velocity of the aircraft.
 */
fun calculateVelocity(initialVelocity: Float, acceleration: Float, time: Float): Float {

    val finalVelocity = initialVelocity + (acceleration * time)
    return if (finalVelocity > initialVelocity) finalVelocity else (initialVelocity - (acceleration * time))
}
/**
 * Calculate the final velocity of an aircraft using the unconditioned ternary operator and repetition.
 *
 * @param initialVelocity The initial velocity of the aircraft.
 * @param acceleration The acceleration of the aircraft.
 * @param time The time at which the final velocity is to be calculated.
 * @return The final velocity of the aircraft.
 */
fun calculateVelocity(initialVelocity: Float, acceleration: Float, time: Float): Float {
/**
 * Calculate the final velocity of an aircraft using the unconditioned ternary operator and repetition.
 *
 * @param initialVelocity The initial velocity of the aircraft.
 * @param acceleration The acceleration of the aircraft.
 * @param time The time at which the final velocity is to be calculated.
 * @return The final velocity of the aircraft.
 */
fun calculateVelocity(initialVelocity: Float, acceleration: Float, time: Float): Float {

    val finalVelocity = initialVelocity + (acceleration * time)
    return if (finalVelocity > initialVelocity) finalVelocity else (initialVelocity - (acceleration * time))
}