Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix INumber.Sign documentation for zero return value#11480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gewarren merged 2 commits intomainfromcopilot/fix-11207
Jun 30, 2025

Conversation

Copilot
Copy link
Contributor

@CopilotCopilotAI commentedJun 19, 2025
edited
Loading

The documentation forINumber<T>.Sign method incorrectly stated that when the input value is zero, it returnsINumberBase<TSelf>.Zero. However, the actual behavior is that it returns the integer value0 (Int32).

Changes Made

  • Updated the return value description inxml/System.Numerics/INumber1.xmlto correctly state that zero inputs return0instead of referencingINumberBase.Zero`

Before

<returns>A positive value if <paramrefname="value" /> is positive, <seecref="P:System.Numerics.INumberBase`1.Zero" /> if <paramrefname="value" /> is zero, and a negative value if <paramrefname="value" /> is negative.</returns>

After

<returns>A positive value if <paramrefname="value" /> is positive, <c>0</c> if <paramrefname="value" /> is zero, and a negative value if <paramrefname="value" /> is negative.</returns>

This aligns with the method's actual return type ofSystem.Int32 and matches the behavior documented in the code examples showing thatMath.Sign() returns integer values (0, 1, -1).

Fixes#11207.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
@CopilotCopilotAI changed the title[WIP] The INumber<T>.Sign method states the wrong return type for zero.Fix INumber.Sign documentation for zero return valueJun 19, 2025
Copilot finished work on behalf ofjeffhandleyJune 19, 2025 07:03
@CopilotCopilotAI requested a review fromjeffhandleyJune 19, 2025 07:03
@jeffhandleyjeffhandley marked this pull request as ready for reviewJune 20, 2025 01:49
@jeffhandleyjeffhandley requested a review froma team as acode ownerJune 20, 2025 01:49
@dotnet-policy-serviceDotnet Policy Service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics

@gewarrengewarren merged commite819bd5 intomainJun 30, 2025
10 of 11 checks passed
@gewarrengewarren deleted the copilot/fix-11207 branchJune 30, 2025 13:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jeffhandleyjeffhandleyjeffhandley approved these changes

@gewarrengewarrengewarren approved these changes

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

The INumber<T>.Sign method states the wrong return type for zero.
3 participants
@Copilot@jeffhandley@gewarren

[8]ページ先頭

©2009-2025 Movatter.jp