github.com/ladydascalie/elvish@v0.0.0-20170703214355-2964dd3ece7f/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 }