Forgot to remove unnecessary tailrec

This commit is contained in:
Gleb Minaev 2022-03-15 15:36:10 +03:00
parent f86529d659
commit 79736a0a9b

View File

@ -33,7 +33,7 @@ internal fun <C> Group<C>.optimizedMultiply(arg: C, other: Int): C =
* @return sum of the augend [base] and product of the multiplicand [arg] and the multiplier [multiplier]. * @return sum of the augend [base] and product of the multiplicand [arg] and the multiplier [multiplier].
* @author Gleb Minaev * @author Gleb Minaev
*/ */
internal tailrec fun <C> Group<C>.optimizedAddMultiplied(base: C, arg: C, multiplier: Int): C = internal fun <C> Group<C>.optimizedAddMultiplied(base: C, arg: C, multiplier: Int): C =
if (multiplier >= 0) optimizedAddMultiplied(base, arg, multiplier.toUInt()) if (multiplier >= 0) optimizedAddMultiplied(base, arg, multiplier.toUInt())
else optimizedAddMultiplied(base, arg, (-multiplier).toUInt()) else optimizedAddMultiplied(base, arg, (-multiplier).toUInt())