Skip to content

Commit c727367

Browse files
committed
Adding basic doc comments for System.Math.Sign, System.Math.SinCos, and System.MathF.SinCos
1 parent 2be79ed commit c727367

File tree

2 files changed

+77
-12
lines changed

2 files changed

+77
-12
lines changed

xml/System/Math.xml

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7036,10 +7036,39 @@ The following example demonstrates how to use the <xref:System.Math.Round%28Syst
70367036
<Parameter Name="value" Type="System.IntPtr" Index="0" FrameworkAlternate="net-6.0" />
70377037
</Parameters>
70387038
<Docs>
7039-
<param name="value">To be added.</param>
7040-
<summary>To be added.</summary>
7041-
<returns>To be added.</returns>
7042-
<remarks>To be added.</remarks>
7039+
<param name="value">A signed number.</param>
7040+
<summary>Returns an integer that indicates the sign of a native sized signed integer.</summary>
7041+
<returns>A number that indicates the sign of <paramref name="value" />, as shown in the following table.
7042+
7043+
<list type="table"><listheader><term> Return value
7044+
7045+
</term><description> Meaning
7046+
7047+
</description></listheader><item><term> -1
7048+
7049+
</term><description><paramref name="value" /> is less than zero.
7050+
7051+
</description></item><item><term> 0
7052+
7053+
</term><description><paramref name="value" /> is equal to zero.
7054+
7055+
</description></item><item><term> 1
7056+
7057+
</term><description><paramref name="value" /> is greater than zero.
7058+
7059+
</description></item></list></returns>
7060+
<remarks>
7061+
<format type="text/markdown"><![CDATA[
7062+
7063+
## Examples
7064+
The following example demonstrates how to use the <xref:System.Math.Sign%28System.IntPtr%29> method to determine the sign of an <xref:System.IntPtr> value and display it to the console.
7065+
7066+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/math.sign/CPP/sign.cpp" id="Snippet1":::
7067+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/math.sign/CS/sign.cs" interactive="try-dotnet" id="Snippet1":::
7068+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/math.sign/VB/sign.vb" id="Snippet1":::
7069+
7070+
]]></format>
7071+
</remarks>
70437072
</Docs>
70447073
</Member>
70457074
<Member MemberName="Sign">
@@ -7317,10 +7346,28 @@ The following example demonstrates how to use the <xref:System.Math.Round%28Syst
73177346
<Parameter Name="x" Type="System.Double" Index="0" FrameworkAlternate="net-6.0" />
73187347
</Parameters>
73197348
<Docs>
7320-
<param name="x">To be added.</param>
7321-
<summary>To be added.</summary>
7322-
<returns>To be added.</returns>
7323-
<remarks>To be added.</remarks>
7349+
<param name="x">An angle, measured in radians.</param>
7350+
<summary>Returns the sine and cosine of the specified angle.</summary>
7351+
<returns>The sine and cosine of <paramref name="x" />. If <paramref name="x" /> is equal to <see cref="F:System.Double.NaN" />, <see cref="F:System.Double.NegativeInfinity" />, or <see cref="F:System.Double.PositiveInfinity" />, this method returns <see cref="F:System.Double.NaN" />.</returns>
7352+
<remarks>
7353+
<format type="text/markdown"><![CDATA[
7354+
7355+
## Remarks
7356+
The angle, `x`, must be in radians. Multiply by <xref:System.Math.PI?displayProperty=nameWithType>/180 to convert degrees to radians.
7357+
7358+
This method calls into the underlying C runtime, and the exact result or valid input range may differ between different operating systems or architectures.
7359+
7360+
7361+
7362+
## Examples
7363+
The following example uses <xref:System.Math.SinCos%2A> to evaluate certain trigonometric identities for selected angles.
7364+
7365+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Math.SinCos/CPP/sincos.cpp" id="Snippet1":::
7366+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.SinCos/CS/sincos.cs" interactive="try-dotnet" id="Snippet1":::
7367+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.SinCos/VB/sincos.vb" id="Snippet1":::
7368+
7369+
]]></format>
7370+
</remarks>
73247371
</Docs>
73257372
</Member>
73267373
<Member MemberName="Sinh">

xml/System/MathF.xml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,10 +2097,28 @@ If the value of the `x` argument is <xref:System.Single.NaN?displayProperty=name
20972097
<Parameter Name="x" Type="System.Single" Index="0" FrameworkAlternate="net-6.0" />
20982098
</Parameters>
20992099
<Docs>
2100-
<param name="x">To be added.</param>
2101-
<summary>To be added.</summary>
2102-
<returns>To be added.</returns>
2103-
<remarks>To be added.</remarks>
2100+
<param name="x">An angle, measured in radians.</param>
2101+
<summary>Returns the sine and cosine of the specified angle.</summary>
2102+
<returns>The sine and cosine of <paramref name="x" />. If <paramref name="x" /> is equal to <see cref="F:System.Single.NaN" />, <see cref="F:System.Single.NegativeInfinity" />, or <see cref="F:System.Single.PositiveInfinity" />, this method returns <see cref="F:System.Single.NaN" />.</returns>
2103+
<remarks>
2104+
<format type="text/markdown"><![CDATA[
2105+
2106+
## Remarks
2107+
The angle, `x`, must be in radians. Multiply by <xref:System.Math.PI?displayProperty=nameWithType>/180 to convert degrees to radians.
2108+
2109+
This method calls into the underlying C runtime, and the exact result or valid input range may differ between different operating systems or architectures.
2110+
2111+
2112+
2113+
## Examples
2114+
The following example uses <xref:System.MathF.SinCos%2A> to evaluate certain trigonometric identities for selected angles.
2115+
2116+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.MathF.SinCos/CPP/sincos.cpp" id="Snippet1":::
2117+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.MathF.SinCos/CS/sincos.cs" interactive="try-dotnet" id="Snippet1":::
2118+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.MathF.SinCos/VB/sincos.vb" id="Snippet1":::
2119+
2120+
]]></format>
2121+
</remarks>
21042122
</Docs>
21052123
</Member>
21062124
<Member MemberName="Sinh">

0 commit comments

Comments
 (0)