diff options
Diffstat (limited to 'lib/builtin.pm')
-rw-r--r-- | lib/builtin.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/builtin.pm b/lib/builtin.pm index 326d200d36..f38d8a99fe 100644 --- a/lib/builtin.pm +++ b/lib/builtin.pm @@ -1,4 +1,4 @@ -package builtin 0.001; +package builtin 0.002; use strict; use warnings; @@ -20,6 +20,7 @@ builtin - Perl pragma to import built-in utility functions true false isbool weaken unweaken isweak blessed refaddr reftype + ceil floor ); =head1 DESCRIPTION @@ -147,6 +148,20 @@ Returns the basic container type of the referent of a reference, or C<undef> for a non-reference. This is returned as a string in all-capitals, such as C<ARRAY> for array references, or C<HASH> for hash references. +=head2 ceil + + $num = ceil($num); + +Returns the smallest integer value greater than or equal to the given +numerical argument. + +=head2 floor + + $num = floor($num); + +Returns the largest integer value less than or equal to the given numerical +argument. + =head1 SEE ALSO L<perlop>, L<perlfunc>, L<Scalar::Util> |