mirror of
https://github.com/DarthAffe/HPPH.git
synced 2025-12-12 13:28:37 +00:00
Fixed rounding in quantization reference
This commit is contained in:
parent
bd7a2bca48
commit
cd4ad4de78
@ -97,10 +97,10 @@ internal class ColorCube
|
|||||||
int b = _colors.Sum(x => x.B);
|
int b = _colors.Sum(x => x.B);
|
||||||
int a = _colors.Sum(x => x.A);
|
int a = _colors.Sum(x => x.A);
|
||||||
|
|
||||||
return T.Create((byte)(r / _colors.Count),
|
return T.Create((byte)MathF.Round(r / (float)_colors.Count),
|
||||||
(byte)(g / _colors.Count),
|
(byte)MathF.Round(g / (float)_colors.Count),
|
||||||
(byte)(b / _colors.Count),
|
(byte)MathF.Round(b / (float)_colors.Count),
|
||||||
(byte)(a / _colors.Count));
|
(byte)MathF.Round(a / (float)_colors.Count));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user