Merged
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/2e7b23c9-7d38-47b2-bd11-f7988ea387dd Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/2e7b23c9-7d38-47b2-bd11-f7988ea387dd Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 19, 2026 09:23
View session
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #69 +/- ##
==========================================
- Coverage 94.07% 93.85% -0.22%
==========================================
Files 128 128
Lines 2496 2524 +28
Branches 198 200 +2
==========================================
+ Hits 2348 2369 +21
- Misses 107 112 +5
- Partials 41 43 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Wrap(min, max) numeric extension for float and double, ported from LightBulb, to cyclically wrap values into a specified range.
Changes:
- Added
Wrap(min, max)instance extensions forfloatanddouble. - Added unit tests covering common in-range/out-of-range wrapping scenarios for both types.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| PowerKit/Extensions/SingleExtensions.cs | Adds float.Wrap(min, max) implementation. |
| PowerKit/Extensions/DoubleExtensions.cs | Adds double.Wrap(min, max) implementation. |
| PowerKit.Tests/Extensions/SingleExtensionsTests.cs | Adds Wrap_Test for float. |
| PowerKit.Tests/Extensions/DoubleExtensionsTests.cs | Adds Wrap_Test for double. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the
Wrapnumeric extension from LightBulb into PowerKit, making it available as a general-purpose utility.Changes
DoubleExtensions.cs/SingleExtensions.cs— addsextension(double value)/extension(float value)instance blocks with aWrap(min, max)method that cyclically wraps a value within the given rangeDoubleExtensionsTests.cs/SingleExtensionsTests.cs— addsWrap_Testcovering in-range, above-max, below-min, boundary, and multi-cycle casesUsage