mirror of
https://github.com/DarthAffe/HPPH.git
synced 2025-12-12 13:28:37 +00:00
Fixed some more code issues
This commit is contained in:
parent
491e9d3f1c
commit
9f37a41f55
@ -56,7 +56,7 @@ public static partial class PixelHelper
|
||||
};
|
||||
}
|
||||
|
||||
internal static Generic3ByteData Average(ReadOnlySpan<Generic3ByteData> data)
|
||||
private static Generic3ByteData Average(ReadOnlySpan<Generic3ByteData> data)
|
||||
{
|
||||
if (data == null) throw new ArgumentNullException(nameof(data));
|
||||
if (data.Length == 0) return default;
|
||||
@ -70,7 +70,7 @@ public static partial class PixelHelper
|
||||
(byte)(sum.L3 / count));
|
||||
}
|
||||
|
||||
internal static Generic4ByteData Average(ReadOnlySpan<Generic4ByteData> data)
|
||||
private static Generic4ByteData Average(ReadOnlySpan<Generic4ByteData> data)
|
||||
{
|
||||
if (data == null) throw new ArgumentNullException(nameof(data));
|
||||
if (data.Length == 0) return default;
|
||||
|
||||
@ -62,7 +62,7 @@ public static unsafe partial class PixelHelper
|
||||
};
|
||||
}
|
||||
|
||||
internal static Generic3ByteMinMax MinMax(ReadOnlySpan<Generic3ByteData> data)
|
||||
private static Generic3ByteMinMax MinMax(ReadOnlySpan<Generic3ByteData> data)
|
||||
{
|
||||
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue;
|
||||
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue;
|
||||
@ -132,7 +132,7 @@ public static unsafe partial class PixelHelper
|
||||
return new Generic3ByteMinMax(minB1, maxB1, minB2, maxB2, minB3, maxB3);
|
||||
}
|
||||
|
||||
internal static Generic4ByteMinMax MinMax(ReadOnlySpan<Generic4ByteData> data)
|
||||
private static Generic4ByteMinMax MinMax(ReadOnlySpan<Generic4ByteData> data)
|
||||
{
|
||||
byte minB1 = byte.MaxValue, minB2 = byte.MaxValue, minB3 = byte.MaxValue, minB4 = byte.MaxValue;
|
||||
byte maxB1 = byte.MinValue, maxB2 = byte.MinValue, maxB3 = byte.MinValue, maxB4 = byte.MinValue;
|
||||
|
||||
@ -64,7 +64,7 @@ public static unsafe partial class PixelHelper
|
||||
};
|
||||
}
|
||||
|
||||
internal static Generic4LongData Sum(ReadOnlySpan<Generic3ByteData> data)
|
||||
private static Generic4LongData Sum(ReadOnlySpan<Generic3ByteData> data)
|
||||
{
|
||||
long b1Sum = 0, b2Sum = 0, b3Sum = 0;
|
||||
|
||||
@ -180,7 +180,7 @@ public static unsafe partial class PixelHelper
|
||||
return new Generic4LongData(b1Sum, b2Sum, b3Sum, data.Length * 255);
|
||||
}
|
||||
|
||||
internal static Generic4LongData Sum(ReadOnlySpan<Generic4ByteData> data)
|
||||
private static Generic4LongData Sum(ReadOnlySpan<Generic4ByteData> data)
|
||||
{
|
||||
long b1Sum, b2Sum, b3Sum, b4Sum;
|
||||
int i = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user