Browse Source
Update src/ImageSharp/PixelFormats/HalfTypeHelper.cs
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
pull/2233/head
James Jackson-South
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
2 deletions
-
src/ImageSharp/PixelFormats/HalfTypeHelper.cs
|
|
|
@ -18,8 +18,7 @@ internal static class HalfTypeHelper |
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
|
|
internal static ushort Pack(float value) |
|
|
|
{ |
|
|
|
Half h = (Half)value; |
|
|
|
return Unsafe.As<Half, ushort>(ref h); |
|
|
|
return BitConverter.HalfToUInt16Bits((Half)value); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|