ceildiv(other) -> IntegerRuby 3.2 から[permalink][rdoc][edit]-
selfをotherで割り、その(剰余を考えない)商を整数に切り上げたものを返します。すなわち、selfをotherで割った商をqとすると、q以上で最小の整数を返します。- [PARAM]
other: -
selfを割る数を指定します。
p 3.ceildiv(3) # => 1 p 4.ceildiv(3) # => 2 p 5.ceildiv(3) # => 2 p 3.ceildiv(1.2) # => 3 p -5.ceildiv(3) # => -1 p -5.ceildiv(-3) # => 2 - [PARAM]