Skip to content

Commit b120c81

Browse files
authored
Merge pull request #13055 from alichraghi/m2m
all: rename `@maximum` to `@max` and `@minimum` to `@min`
2 parents 4962f36 + 71e0ab4 commit b120c81

34 files changed

+307
-299
lines changed

doc/langref.html.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8977,15 +8977,15 @@ test "integer cast panic" {
89778977
</p>
89788978
{#header_close#}
89798979

8980-
{#header_open|@maximum#}
8981-
<pre>{#syntax#}@maximum(a: T, b: T) T{#endsyntax#}</pre>
8980+
{#header_open|@max#}
8981+
<pre>{#syntax#}@max(a: T, b: T) T{#endsyntax#}</pre>
89828982
<p>
89838983
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.
89848984
</p>
89858985
<p>
89868986
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.
89878987
</p>
8988-
{#see_also|@minimum|Vectors#}
8988+
{#see_also|@min|Vectors#}
89898989
{#header_close#}
89908990

89918991
{#header_open|@memcpy#}
@@ -9025,15 +9025,15 @@ mem.copy(u8, dest[0..byte_count], source[0..byte_count]);{#endsyntax#}</pre>
90259025
mem.set(u8, dest, c);{#endsyntax#}</pre>
90269026
{#header_close#}
90279027

9028-
{#header_open|@minimum#}
9029-
<pre>{#syntax#}@minimum(a: T, b: T) T{#endsyntax#}</pre>
9028+
{#header_open|@min#}
9029+
<pre>{#syntax#}@min(a: T, b: T) T{#endsyntax#}</pre>
90309030
<p>
90319031
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.
90329032
</p>
90339033
<p>
90349034
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.
90359035
</p>
9036-
{#see_also|@maximum|Vectors#}
9036+
{#see_also|@max|Vectors#}
90379037
{#header_close#}
90389038

90399039
{#header_open|@wasmMemorySize#}

lib/compiler_rt/float_to_int.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ pub inline fn floatToInt(comptime I: type, a: anytype) I {
2929
switch (@typeInfo(I).Int.signedness) {
3030
.unsigned => {
3131
if (negative) return 0;
32-
if (@intCast(c_uint, exponent) >= @minimum(int_bits, max_exp)) return math.maxInt(I);
32+
if (@intCast(c_uint, exponent) >= @min(int_bits, max_exp)) return math.maxInt(I);
3333
},
34-
.signed => if (@intCast(c_uint, exponent) >= @minimum(int_bits - 1, max_exp)) {
34+
.signed => if (@intCast(c_uint, exponent) >= @min(int_bits - 1, max_exp)) {
3535
return if (negative) math.minInt(I) else math.maxInt(I);
3636
},
3737
}

0 commit comments

Comments
 (0)