ceil
fn ceil(float x) -> float
Source: compiler/src/builtin_docs/prelude/math.hy Returns the smallest whole number greater than or equal to x, as a float.
Parameters#
| Name | Type |
|---|---|
x | float |
Returns#
float
Examples#
use tests::assert;
assert!(ceil(2.1) == 3.0);
assert!(ceil(-2.7) == -2.0);
See also#
floatsin: Returns the sine ofx(in radians).cos: Returns the cosine ofx(in radians).tan: Returns the tangent ofx(in radians).sqrt: Returns the square root ofx.floor: Returns the largest whole number less than or equal tox, as afloat.exp: Returnseraised to the powerx.ln: Returns the natural logarithm ofx.