commit c62bf068e53e1a2b06c7f0195a4b25467b587b42 (tree) parent fcdb7d9e4706179f65aa7e206f1d99c61724d722 Author: antlilja <liljaanton2001@gmail.com> Date: Tue, 18 Jul 2023 02:19:03 +0200 Change `@fabs` to `@abs` in langref Diffstat:
| M | doc/langref.html.in | | | 11 | +++++++---- |
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -9421,14 +9421,17 @@ fn doTheTest() !void { Supports {#link|Floats#} and {#link|Vectors#} of floats. </p> {#header_close#} - {#header_open|@fabs#} - <pre>{#syntax#}@fabs(value: anytype) @TypeOf(value){#endsyntax#}</pre> + {#header_open|@abs#} + <pre>{#syntax#}@abs(value: anytype) anytype{#endsyntax#}</pre> <p> - Returns the absolute value of a floating point number. Uses a dedicated hardware instruction + Returns the absolute value of an integer or a floating point number. Uses a dedicated hardware instruction when available. + + The return type is always an unsigned integer of the same bit width as the operand if the operand is an integer. + Unsigned integer operands are supported. The builtin cannot overflow for signed integer operands. </p> <p> - Supports {#link|Floats#} and {#link|Vectors#} of floats. + Supports {#link|Floats#}, {#link|Integers#} and {#link|Vectors#} of floats or integers. </p> {#header_close#} {#header_open|@floor#}