Skip to content

Document that Is.InRange requires from <= to - #1271

Merged
SeanKilleen merged 1 commit into
masterfrom
872_range-constraint-ordering
Oct 22, 2026
Merged

SeanKilleen merged 1 commit into
masterfrom
872_range-constraint-ordering

Conversation

@SeanKilleen

Copy link
Copy Markdown
Member

Documents that Is.InRange(from, to) requires from <= to and throws ArgumentException otherwise, that negative bounds are allowed as long as the range is written in increasing order, and shows how to sort computed bounds before passing them. This reflects the team's decision in the linked thread to keep the current behaviour and clarify it in the docs.

Fixes #872

🤖 Generated with Claude Code

Documents that `Is.InRange(from, to)` requires `from <= to` and throws `ArgumentException` otherwise, that negative bounds are allowed as long as the range is written in increasing order, and shows how to sort computed bounds before passing them. This reflects the team's decision in the linked thread to keep the current behaviour and clarify it in the docs.

Fixes #872

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

📖 Docs preview removed because this PR was closed.

@OsirisTerje OsirisTerje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@SeanKilleen
SeanKilleen merged commit eb678cb into master Oct 22, 2026
6 checks passed
@SeanKilleen
SeanKilleen deleted the 872_range-constraint-ordering branch October 22, 2026 12:38
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
Documents that `Is.InRange(from, to)` requires `from <= to` and throws `ArgumentException` otherwise, that negative bounds are allowed as long as the range is written in increasing order, and shows how to sort computed bounds before passing them. This reflects the team's decision in the linked thread to keep the current behaviour and clarify it in the docs.

Fixes #872

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> eb678cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation of the InRange constraint does not mention whether from...to also allows negative ranges, e.g. from 0 to -10

2 participants