File 0304-erlang-module-doc-Improve-documentation-for-erlang-t.patch of Package erlang
From 60acececed1b8d03a2c29b26a7b97664d0f8d86b Mon Sep 17 00:00:00 2001
From: Kjell Winblad <kjellwinblad@gmail.com>
Date: Mon, 31 Aug 2020 10:20:09 +0200
Subject: [PATCH 04/39] erlang module doc: Improve documentation for
erlang:trunc/1
* Better examples
* More precise description
---
erts/doc/src/erlang.xml | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 73dbde42f6..c7e13548a9 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -11676,12 +11676,18 @@ improper_end</pre>
<func>
<name name="trunc" arity="1" since=""/>
- <fsummary>Return an integer by truncating a number.</fsummary>
+ <fsummary>Truncates the decimals of a number.</fsummary>
<desc>
- <p>Returns an integer by truncating <c><anno>Number</anno></c>,
+ <p>Truncates the decimals of <c><anno>Number</anno></c>,
for example:</p>
<pre>
-> <input>trunc(5.5).</input>
+> <input>trunc(5.7).</input>
+5</pre>
+ <pre>
+> <input>trunc(-5.7).</input>
+-5</pre>
+ <pre>
+> <input>trunc(5).</input>
5</pre>
<p>Allowed in guard tests.</p>
</desc>
--
2.26.2