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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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); |
|
|
|
} |
|
|
|
|