commit 816dfca0b579440604eb871c6a76a3edd250240f (tree)
parent d38ed893c6ece24e52b2e0a1f8d75f6a912686d7
Author: wooster0 <wooster0@proton.me>
Date: Thu, 3 Oct 2024 20:37:36 +0900
langref: update builtin variadic functions
Documentation was outdated.
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/langref.html.in b/doc/langref.html.in
@@ -4623,7 +4623,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
{#header_close#}
{#header_open|@compileLog#}
- <pre>{#syntax#}@compileLog(args: ...) void{#endsyntax#}</pre>
+ <pre>{#syntax#}@compileLog(...) void{#endsyntax#}</pre>
<p>
This function prints the arguments passed to it at compile-time.
</p>
@@ -5061,12 +5061,12 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
{#header_close#}
{#header_open|@max#}
- <pre>{#syntax#}@max(a: T, b: T) T{#endsyntax#}</pre>
+ <pre>{#syntax#}@max(...) T{#endsyntax#}</pre>
<p>
- Returns the maximum value of {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#}. This builtin accepts integers, floats, and vectors of either. In the latter case, the operation is performed element wise.
+ Takes two or more arguments and returns the biggest value included (the maximum). This builtin accepts integers, floats, and vectors of either. In the latter case, the operation is performed element wise.
</p>
<p>
- NaNs are handled as follows: if one of the operands of a (pairwise) operation is NaN, the other operand is returned. If both operands are NaN, NaN is returned.
+ NaNs are handled as follows: return the biggest non-NaN value included. If all operands are NaN, return NaN.
</p>
{#see_also|@min|Vectors#}
{#header_close#}
@@ -5100,12 +5100,12 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
{#header_close#}
{#header_open|@min#}
- <pre>{#syntax#}@min(a: T, b: T) T{#endsyntax#}</pre>
+ <pre>{#syntax#}@min(...) T{#endsyntax#}</pre>
<p>
- Returns the minimum value of {#syntax#}a{#endsyntax#} and {#syntax#}b{#endsyntax#}. This builtin accepts integers, floats, and vectors of either. In the latter case, the operation is performed element wise.
+ Takes two or more arguments and returns the smallest value included (the minimum). This builtin accepts integers, floats, and vectors of either. In the latter case, the operation is performed element wise.
</p>
<p>
- NaNs are handled as follows: if one of the operands of a (pairwise) operation is NaN, the other operand is returned. If both operands are NaN, NaN is returned.
+ NaNs are handled as follows: return the smallest non-NaN value included. If all operands are NaN, return NaN.
</p>
{#see_also|@max|Vectors#}
{#header_close#}
@@ -5788,7 +5788,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
{#header_open|@TypeOf#}
<pre>{#syntax#}@TypeOf(...) type{#endsyntax#}</pre>
<p>
- {#syntax#}@TypeOf{#endsyntax#} is a special builtin function that takes any (nonzero) number of expressions
+ {#syntax#}@TypeOf{#endsyntax#} is a special builtin function that takes any (non-zero) number of expressions
as parameters and returns the type of the result, using {#link|Peer Type Resolution#}.
</p>
<p>