solve edge case

This commit is contained in:
dennisarfan 2025-08-01 09:51:39 +07:00
parent 741d34a5e0
commit 0472bfe58e
15 changed files with 685 additions and 47 deletions

View file

@ -68,6 +68,12 @@ public record struct Int32Pixel
return new Int32Pixel(a.R / b, a.G / b, a.B / b);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Int32Pixel operator /(Int32Pixel a, float b)
{
return new Int32Pixel((byte)(a.R / b), (byte)(a.G / b), (byte)(a.B / b));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static explicit operator Int32Pixel(Rgb24 pixel)
{