ModInt64 returns a % b with an integer overflow check.
(a, b int64)
| 56 | // ModInt64 returns a % b |
| 57 | // with an integer overflow check. |
| 58 | func ModInt64(a, b int64) (remainder int64, ok bool) { |
| 59 | if b == 0 || (a == math.MinInt64 && b == -1) { |
| 60 | return 0, false |
| 61 | } |
| 62 | return a % b, true |
| 63 | } |
| 64 | |
| 65 | // NegateInt64 returns -a |
| 66 | // with an integer overflow check. |
nothing calls this directly
no outgoing calls
no test coverage detected