Skip to content

Commit 663c473

Browse files
tannergoodingcarlossanlopgewarren
authored
Porting new docs for the System.Numerics namespace (dotnet#9165)
* Porting new docs for the System.Numerics namespace * Apply suggestions from code review Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com> * contain => contains --------- Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
1 parent ef265b2 commit 663c473

File tree

7 files changed

+211
-185
lines changed

7 files changed

+211
-185
lines changed

xml/System.Numerics/BigInteger.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11360,9 +11360,9 @@ The integer value `33022` can be exported in four different arrays:
1136011360
<Parameter Name="result" Type="System.Numerics.BigInteger" RefType="out" Index="2" FrameworkAlternate="net-7.0;net-8.0" />
1136111361
</Parameters>
1136211362
<Docs>
11363-
<param name="s">To be added.</param>
11364-
<param name="provider">To be added.</param>
11365-
<param name="result">To be added.</param>
11363+
<param name="s">The span of characters to parse.</param>
11364+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
11365+
<param name="result">When this method returns, contains the result of successfully parsing <paramref name="s" />, or an undefined value on failure.</param>
1136611366
<summary>Tries to parse a span of characters into a value.</summary>
1136711367
<returns>
1136811368
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>
@@ -11405,11 +11405,12 @@ The integer value `33022` can be exported in four different arrays:
1140511405
<Parameter Name="result" Type="System.Numerics.BigInteger" RefType="out" Index="2" FrameworkAlternate="net-7.0;net-8.0" />
1140611406
</Parameters>
1140711407
<Docs>
11408-
<param name="s">To be added.</param>
11409-
<param name="provider">To be added.</param>
11410-
<param name="result">To be added.</param>
11411-
<summary>To be added.</summary>
11412-
<returns>To be added.</returns>
11408+
<param name="s">The string to parse.</param>
11409+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
11410+
<param name="result">When this method returns, contains the result of successfully parsing <paramref name="s" /> or an undefined value on failure.</param>
11411+
<summary>Tries to parse a string into a value.</summary>
11412+
<returns>
11413+
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>
1141311414
<remarks>To be added.</remarks>
1141411415
<inheritdoc cref="M:System.IParsable`1.TryParse(System.String,System.IFormatProvider,`0@)" />
1141511416
</Docs>

xml/System.Numerics/BitOperations.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
<Parameter Name="data" Type="System.Byte" Index="1" FrameworkAlternate="net-8.0" />
6262
</Parameters>
6363
<Docs>
64-
<param name="crc">To be added.</param>
65-
<param name="data">To be added.</param>
66-
<summary>To be added.</summary>
67-
<returns>To be added.</returns>
64+
<param name="crc">The base value to calculate checksum on.</param>
65+
<param name="data">The data for which to compute the checksum.</param>
66+
<summary>Accumulates the CRC (Cyclic redundancy check) checksum.</summary>
67+
<returns>The CRC-checksum.</returns>
6868
<remarks>To be added.</remarks>
6969
</Docs>
7070
</Member>
@@ -97,10 +97,10 @@
9797
<Parameter Name="data" Type="System.UInt16" Index="1" FrameworkAlternate="net-8.0" />
9898
</Parameters>
9999
<Docs>
100-
<param name="crc">To be added.</param>
101-
<param name="data">To be added.</param>
102-
<summary>To be added.</summary>
103-
<returns>To be added.</returns>
100+
<param name="crc">The base value to calculate checksum on.</param>
101+
<param name="data">The data for which to compute the checksum.</param>
102+
<summary>Accumulates the CRC (Cyclic redundancy check) checksum.</summary>
103+
<returns>The CRC-checksum.</returns>
104104
<remarks>To be added.</remarks>
105105
</Docs>
106106
</Member>
@@ -133,10 +133,10 @@
133133
<Parameter Name="data" Type="System.UInt32" Index="1" FrameworkAlternate="net-8.0" />
134134
</Parameters>
135135
<Docs>
136-
<param name="crc">To be added.</param>
137-
<param name="data">To be added.</param>
138-
<summary>To be added.</summary>
139-
<returns>To be added.</returns>
136+
<param name="crc">The base value to calculate checksum on.</param>
137+
<param name="data">The data for which to compute the checksum.</param>
138+
<summary>Accumulates the CRC (Cyclic redundancy check) checksum.</summary>
139+
<returns>The CRC-checksum.</returns>
140140
<remarks>To be added.</remarks>
141141
</Docs>
142142
</Member>
@@ -169,10 +169,10 @@
169169
<Parameter Name="data" Type="System.UInt64" Index="1" FrameworkAlternate="net-8.0" />
170170
</Parameters>
171171
<Docs>
172-
<param name="crc">To be added.</param>
173-
<param name="data">To be added.</param>
174-
<summary>To be added.</summary>
175-
<returns>To be added.</returns>
172+
<param name="crc">The base value to calculate checksum on.</param>
173+
<param name="data">The data for which to compute the checksum.</param>
174+
<summary>Accumulates the CRC (Cyclic redundancy check) checksum.</summary>
175+
<returns>The CRC-checksum.</returns>
176176
<remarks>To be added.</remarks>
177177
</Docs>
178178
</Member>

xml/System.Numerics/Complex.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6981,9 +6981,9 @@ An implementation of this interface should produce the same string of characters
69816981
<Parameter Name="result" Type="System.Numerics.Complex" RefType="out" Index="2" FrameworkAlternate="net-7.0;net-8.0" />
69826982
</Parameters>
69836983
<Docs>
6984-
<param name="s">To be added.</param>
6985-
<param name="provider">To be added.</param>
6986-
<param name="result">To be added.</param>
6984+
<param name="s">The span of characters to parse.</param>
6985+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
6986+
<param name="result">When this method returns, contains the result of successfully parsing <paramref name="s" />, or an undefined value on failure.</param>
69876987
<summary>Tries to parse a span of characters into a value.</summary>
69886988
<returns>
69896989
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>
@@ -7026,9 +7026,9 @@ An implementation of this interface should produce the same string of characters
70267026
<Parameter Name="result" Type="System.Numerics.Complex" RefType="out" Index="2" FrameworkAlternate="net-7.0;net-8.0" />
70277027
</Parameters>
70287028
<Docs>
7029-
<param name="s">To be added.</param>
7030-
<param name="provider">To be added.</param>
7031-
<param name="result">To be added.</param>
7029+
<param name="s">The string to parse.</param>
7030+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
7031+
<param name="result">When this method returns, contains the result of successfully parsing <paramref name="s" /> or an undefined value on failure.</param>
70327032
<summary>Tries to parse a string into a value.</summary>
70337033
<returns>
70347034
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>
@@ -7065,10 +7065,10 @@ An implementation of this interface should produce the same string of characters
70657065
<Parameter Name="result" Type="System.Numerics.Complex" RefType="out" Index="3" FrameworkAlternate="net-7.0;net-8.0" />
70667066
</Parameters>
70677067
<Docs>
7068-
<param name="s">To be added.</param>
7069-
<param name="style">To be added.</param>
7070-
<param name="provider">To be added.</param>
7071-
<param name="result">To be added.</param>
7068+
<param name="s">The span of characters to parse.</param>
7069+
<param name="style">A bitwise combination of number styles that can be present in <paramref name="s" />.</param>
7070+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
7071+
<param name="result">On return, contains the result of succesfully parsing <paramref name="s" /> or an undefined value on failure.</param>
70727072
<summary>Tries to parse a span of characters into a value.</summary>
70737073
<returns>
70747074
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>
@@ -7112,10 +7112,10 @@ An implementation of this interface should produce the same string of characters
71127112
<Parameter Name="result" Type="System.Numerics.Complex" RefType="out" Index="3" FrameworkAlternate="net-7.0;net-8.0" />
71137113
</Parameters>
71147114
<Docs>
7115-
<param name="s">To be added.</param>
7116-
<param name="style">To be added.</param>
7117-
<param name="provider">To be added.</param>
7118-
<param name="result">To be added.</param>
7115+
<param name="s">The string to parse.</param>
7116+
<param name="style">A bitwise combination of number styles that can be present in <paramref name="s" />.</param>
7117+
<param name="provider">An object that provides culture-specific formatting information about <paramref name="s" />.</param>
7118+
<param name="result">On return, contains the result of succesfully parsing <paramref name="s" /> or an undefined value on failure.</param>
71197119
<summary>Tries to parse a string into a value.</summary>
71207120
<returns>
71217121
<see langword="true" /> if <paramref name="s" /> was successfully parsed; otherwise, <see langword="false" />.</returns>

xml/System.Numerics/IFloatingPointIeee754`1.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,12 @@ This computes `arctan(y / x) / π` in the interval `[-1, +1]`.
372372
<Parameter Name="amount" Type="TSelf" Index="2" FrameworkAlternate="net-8.0" />
373373
</Parameters>
374374
<Docs>
375-
<param name="value1">To be added.</param>
376-
<param name="value2">To be added.</param>
377-
<param name="amount">To be added.</param>
378-
<summary>To be added.</summary>
379-
<returns>To be added.</returns>
380-
<remarks>To be added.</remarks>
375+
<param name="value1">The first value, which is intended to be the lower bound.</param>
376+
<param name="value2">The second value, which is intended to be the upper bound.</param>
377+
<param name="amount">A value, intended to be between 0 and 1, that indicates the weight of the interpolation.</param>
378+
<summary>Performs a linear interpolation between two values based on the given weight.</summary>
379+
<returns>The interpolated value.</returns>
380+
<remarks>This method presumes inputs are well formed and does not validate that <c>value1 &lt; value2</c> nor that <c>0 &lt;= amount &lt;= 1</c>.</remarks>
381381
</Docs>
382382
</Member>
383383
<Member MemberName="NaN">

xml/System.Numerics/TotalOrderIeee754Comparer`1.xml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
</Attribute>
3838
</Attributes>
3939
<Docs>
40-
<typeparam name="T">To be added.</typeparam>
41-
<summary>To be added.</summary>
40+
<typeparam name="T">The type of the numbers to be compared, must be an IEEE 754 floating-point type.</typeparam>
41+
<summary>Represents a comparison operation that compares floating-point numbers with IEEE 754 totalOrder semantic.</summary>
4242
<remarks>To be added.</remarks>
4343
</Docs>
4444
<Members>
@@ -65,11 +65,13 @@
6565
<Parameter Name="y" Type="T" />
6666
</Parameters>
6767
<Docs>
68-
<param name="x">To be added.</param>
69-
<param name="y">To be added.</param>
70-
<summary>To be added.</summary>
71-
<returns>To be added.</returns>
72-
<remarks>To be added.</remarks>
68+
<param name="x">The first number to compare.</param>
69+
<param name="y">The second number to compare.</param>
70+
<summary>Compares two numbers with IEEE 754 totalOrder semantic and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
71+
<returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.
72+
<list type="table"><listheader><term> Value</term><description> Meaning</description></listheader><item><term> Less than zero</term><description><paramref name="x" /> is less than <paramref name="y" /></description></item><item><term> Zero</term><description><paramref name="x" /> equals <paramref name="y" /></description></item><item><term> Greater than zero</term><description><paramref name="x" /> is greater than <paramref name="y" /></description></item></list></returns>
73+
<remarks>IEEE 754 specification defines totalOrder as &lt;= semantic.
74+
totalOrder(x,y) is <see langword="true" /> when the result of this method is less than or equal to 0.</remarks>
7375
</Docs>
7476
</Member>
7577
<Member MemberName="Equals">
@@ -155,11 +157,13 @@
155157
<Parameter Name="y" Type="T" />
156158
</Parameters>
157159
<Docs>
158-
<param name="x">To be added.</param>
159-
<param name="y">To be added.</param>
160-
<summary>To be added.</summary>
161-
<returns>To be added.</returns>
162-
<remarks>To be added.</remarks>
160+
<param name="x">The first number of type <typeparamref name="T" /> to compare.</param>
161+
<param name="y">The second number of type <typeparamref name="T" /> to compare.</param>
162+
<summary>Determines whether the specified numbers are equal.</summary>
163+
<returns>
164+
<see langword="true" /> if the specified numbers are equal; otherwise, <see langword="false" />.</returns>
165+
<remarks>There is no corresponding equals semantic with totalOrder defined by IEEE 754 specification.
166+
This method returns <see langword="true" /> when <see cref="M:System.Numerics.TotalOrderIeee754Comparer`1.Compare(`0,`0)" /> returns 0.</remarks>
163167
</Docs>
164168
</Member>
165169
<Member MemberName="GetHashCode">
@@ -213,9 +217,9 @@
213217
</Parameter>
214218
</Parameters>
215219
<Docs>
216-
<param name="obj">To be added.</param>
217-
<summary>To be added.</summary>
218-
<returns>To be added.</returns>
220+
<param name="obj">The number for which a hash code is to be returned.</param>
221+
<summary>Returns a hash code for the specified number.</summary>
222+
<returns>A hash code for the specified number.</returns>
219223
<remarks>To be added.</remarks>
220224
</Docs>
221225
</Member>

0 commit comments

Comments
 (0)