github.com/xiaq/elvish@v0.12.0/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  }