mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
7 lines
139 B
Go
7 lines
139 B
Go
package edit
|
|
|
|
// CeilDiv computes ceil(float(a)/b) without using float arithmetics.
|
|
func CeilDiv(a, b int) int {
|
|
return (a + b - 1) / b
|
|
}
|