Browse Source

Update src/ImageSharp/PixelFormats/HalfTypeHelper.cs

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
pull/2233/head
James Jackson-South 3 years ago
committed by GitHub
parent
commit
6e7ca25d05
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/PixelFormats/HalfTypeHelper.cs

2
src/ImageSharp/PixelFormats/HalfTypeHelper.cs

@ -28,5 +28,5 @@ internal static class HalfTypeHelper
/// <param name="value">The value.</param>
/// <returns>The <see cref="float"/>.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static float Unpack(ushort value) => (float)Unsafe.As<ushort, Half>(ref value);
internal static float Unpack(ushort value) => (float)BitConverter.UInt16BitsToHalf(value);
}

Loading…
Cancel
Save