Skip to content

Updated Random Resolvers to include sphere and circle boundary.#17

Merged
lextatic merged 3 commits intomainfrom
feature/random-inside-consider-bounds
May 2, 2026
Merged

Updated Random Resolvers to include sphere and circle boundary.#17
lextatic merged 3 commits intomainfrom
feature/random-inside-consider-bounds

Conversation

@lextatic
Copy link
Copy Markdown
Contributor

@lextatic lextatic commented May 2, 2026

Changed

  • RandomInsideCircle and RandomInsideSphere now can reach sphere and circle radius by default.

@lextatic lextatic added the changed Changes in existing functionality label May 2, 2026
@lextatic lextatic requested a review from Copilot May 2, 2026 02:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Statescript random geometry resolvers so RandomInsideCircle / RandomInsideSphere can reach the unit boundary, and RandomOnSphere can include the poles, aligning implementation, docs, and tests.

Changes:

  • Switch radius / axial sampling in GameplayMathUtils to NextSingleInclusive() for circle/sphere sampling.
  • Update resolver docs to clarify inclusive boundary behavior and exclusive seam-angle sampling.
  • Add/extend resolver tests to cover boundary reachability and sampling-method call patterns (plus add range edge-case tests for RandomResolver).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/statescript/resolvers/randomonsphere-resolver.md Documents pole inclusion + exclusive seam-angle sampling.
docs/statescript/resolvers/randominsidesphere-resolver.md Documents inclusive boundary behavior and sampling details.
docs/statescript/resolvers/randominsidecircle-resolver.md Documents inclusive boundary behavior and exclusive angle seam.
docs/statescript/resolvers/randomdirection-resolver.md Adds seam-angle sampling note.
Forge/Statescript/Properties/GameplayMathUtils.cs Uses inclusive random sampling for radius/axial terms to include boundaries.
Forge.Tests/Statescript/Resolvers/RandomResolverTests.cs Adds tests for reversed/equal bounds returning min without RNG calls.
Forge.Tests/Statescript/Resolvers/RandomOnSphereResolverTests.cs Adds tests for pole reachability and inclusive/exclusive call usage.
Forge.Tests/Statescript/Resolvers/RandomInsideSphereResolverTests.cs Adds tests asserting sphere-boundary reachability and call patterns.
Forge.Tests/Statescript/Resolvers/RandomInsideCircleResolverTests.cs Adds tests asserting circle-boundary reachability and call patterns.
Forge.Tests/Statescript/Resolvers/RandomDirectionResolverTests.cs Adds tests around seam-angle behavior and near- boundary direction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/statescript/resolvers/randomdirection-resolver.md Outdated
@lextatic lextatic merged commit 4da01ca into main May 2, 2026
1 check passed
@lextatic lextatic deleted the feature/random-inside-consider-bounds branch May 2, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changed Changes in existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants