mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Fix adjustment switch
This commit is contained in:
parent
fb4bb73e43
commit
27efb7ef9b
1 changed files with 3 additions and 3 deletions
|
|
@ -168,9 +168,9 @@ public class VertexAttribute
|
|||
var closestIndex = Enumerable.Range(0, byteValues.Length)
|
||||
.Where(i => adjustment switch
|
||||
{
|
||||
< 0 when byteValues[i] > 0 => true,
|
||||
> 0 when byteValues[i] < 255 => true,
|
||||
_ => true,
|
||||
< 0 => byteValues[i] > 0,
|
||||
> 0 => byteValues[i] < 255,
|
||||
_ => true,
|
||||
})
|
||||
.Select(index => (index, delta: Math.Abs(originalData[index] - (byteValues[index] * (1f / 255f)))))
|
||||
.MinBy(x => x.delta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue