github.com/hoop33/elvish@v0.0.0-20160801152013-6d25485beab4/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 }