mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +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)
|
var closestIndex = Enumerable.Range(0, byteValues.Length)
|
||||||
.Where(i => adjustment switch
|
.Where(i => adjustment switch
|
||||||
{
|
{
|
||||||
< 0 when byteValues[i] > 0 => true,
|
< 0 => byteValues[i] > 0,
|
||||||
> 0 when byteValues[i] < 255 => true,
|
> 0 => byteValues[i] < 255,
|
||||||
_ => true,
|
_ => true,
|
||||||
})
|
})
|
||||||
.Select(index => (index, delta: Math.Abs(originalData[index] - (byteValues[index] * (1f / 255f)))))
|
.Select(index => (index, delta: Math.Abs(originalData[index] - (byteValues[index] * (1f / 255f)))))
|
||||||
.MinBy(x => x.delta)
|
.MinBy(x => x.delta)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue