From 814cdaf26df1a28f1c541c29d36cc28d6c5d75fa Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 26 Mar 2013 14:35:38 -0700 Subject: [PATCH] math.functions: clarify rounding behavior. --- basis/math/functions/functions-docs.factor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/basis/math/functions/functions-docs.factor b/basis/math/functions/functions-docs.factor index 13484ce500..0260a6f37c 100644 --- a/basis/math/functions/functions-docs.factor +++ b/basis/math/functions/functions-docs.factor @@ -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 } }