in bijection-core/src/main/scala/com/twitter/bijection/ModDivInjection.scala [37:46]
override def invert(moddiv: (Int, Int)) = {
val (mod, div) = moddiv
val res = div * modulus + mod
if (
mod >= 0 && mod < modulus && div <= maxDiv && div >= minDiv &&
// We could wrap around if we get bad input:
((res >= 0) == (div >= 0))
) Success(res)
else InversionFailure.failedAttempt(moddiv)
}