lib.algebra
def
makeOdd(n: float | int) -> int:
2def makeOdd(n: float | int) -> int: 3 """Round a number to the nearest odd integer.""" 4 n_rounded = round(n) 5 if n_rounded % 2 == 0: 6 return n_rounded + 1 7 return n_rounded
Round a number to the nearest odd integer.