github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/elvish/util/ceildiv.go (about) 1 package util 2 3 // CeilDiv computes ceil(float(a)/b) without using float arithmetics. 4 func CeilDiv(a, b int) int { 5 return (a + b - 1) / b 6 }