Commit eda72fc
PlayStation: use Color.GetR/GetG/GetB extensions for byte conversion
Addresses DarthAffe's review feedback on PR DarthAffe#454 — the manual
(byte)Math.Clamp((int)Math.Round(c * 255.0), 0, 255) pattern in both
update queues is replaced with the project's standard Color.GetR /
GetG / GetB extensions, which delegate to GetByteValueFromPercentage
in RGB.NET.Core. That gives consistent rounding behaviour across the
codebase and matches the convention every other provider uses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6dd3b99 commit eda72fc
2 files changed
Lines changed: 6 additions & 6 deletions
File tree
- RGB.NET.Devices.PlayStation
- DualSense
- DualShock4
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
0 commit comments