ModInt32 returns a % b with an integer overflow check.
(a, b int32)
| 136 | // ModInt32 returns a % b |
| 137 | // with an integer overflow check. |
| 138 | func ModInt32(a, b int32) (remainder int32, ok bool) { |
| 139 | if b == 0 || (a == math.MinInt32 && b == -1) { |
| 140 | return 0, false |
| 141 | } |
| 142 | return a % b, true |
| 143 | } |
| 144 | |
| 145 | // NegateInt32 returns -a |
| 146 | // with an integer overflow check. |
nothing calls this directly
no outgoing calls
no test coverage detected