math.functions: clarify rounding behavior.

db4
John Benediktsson 2013-03-26 14:35:38 -07:00
parent 4c941e8996
commit 814cdaf26d
1 changed files with 6 additions and 2 deletions

View File

@ -326,8 +326,12 @@ HELP: ceiling
HELP: round
{ $values { "x" real } { "y" "a whole real number" } }
{ $description "Outputs the whole number closest to " { $snippet "x" } "." }
{ $notes "The result is not necessarily an integer." } ;
{ $description "Outputs the whole number closest to " { $snippet "x" } ", rounding out at half." }
{ $notes "The result is not necessarily an integer." }
{ $examples
{ $example "USING: math.functions prettyprint ;" "4.5 round ." "5.0" }
{ $example "USING: math.functions prettyprint ;" "4.4 round ." "4.0" }
} ;
HELP: round-to
{ $values { "x" real } { "n" integer } { "y" real } }