Skip to content

Commit

Permalink
Simplify IsNegative
Browse files Browse the repository at this point in the history
  • Loading branch information
enusbaum committed Nov 20, 2024
1 parent af2fac9 commit 6701c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ADNES/Common/Extensions/ByteExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal static class ByteExtension
/// <param name="b"></param>
/// <returns></returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsNegative(this byte b) => (b & (1 << 7)) != 0;
public static bool IsNegative(this byte b) => b.IsBitSet(7);

/// <summary>
/// Returns if the specified bit was set
Expand Down

0 comments on commit 6701c3e

Please sign in to comment.