initial commits
parent
91e9ea5115
commit
d95d73b49f
|
@ -0,0 +1,12 @@
|
|||
package imgrow
|
||||
|
||||
func divideByZero(n int) int {
|
||||
switch {
|
||||
case 0 < n:
|
||||
return intMax
|
||||
case n < 0:
|
||||
return intMin
|
||||
default: // 0 == n
|
||||
return 0
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue