Skip to content

Commit

Permalink
Document behaviour of .round at mid-points
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 27, 2016
1 parent 1c9b0e3 commit f907bcd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/Type/Cool.pod6
Expand Up @@ -589,6 +589,13 @@ C<$unit>. If C<$unit> is 1, rounds to the nearest integer.
say 1.07.round(0.1); # 1.1
say 21.round(10); # 20
Always rounds B<up> if the number is at mid-point:
say (−.5 ).round; # 0
say ( .5 ).round; # 1
say (−.55).round(.1); # -0.5
say ( .55).round(.1); # 0.6
=head2 routine floor
Defined as:
Expand Down

0 comments on commit f907bcd

Please sign in to comment.