In role Real§
See primary documentation in context for method ceiling.
method ceiling(Real:D: --> Int:D)
Returns the smallest integer not less than the number.
In role Rational§
See primary documentation in context for method ceiling.
method ceiling(Rational:D: --> Int:D)
Return the smallest integer not less than the invocant. If denominator is zero, fails with X::Numeric::DivideByZero
.
In Cool§
See primary documentation in context for routine ceiling.
multi ceiling(Numeric(Cool)) multi method ceiling
Coerces the invocant (or in sub form, its argument) to Numeric
, and rounds it upwards to the nearest integer.
say "1".ceiling; # OUTPUT: «1» say "-0.9".ceiling; # OUTPUT: «0» say "42.1".ceiling; # OUTPUT: «43»
In Complex§
See primary documentation in context for method ceiling.
method ceiling(Complex:D: --> Complex:D)
Returns self.re.ceiling + self.im.ceiling
. That is, each of the real and imaginary parts is rounded to the lowest integer not less than the value of that part.
say (1.2-3.8i).ceiling; # OUTPUT: «2-3i»