NumberExtensions.cs 538 B

123456789101112131415161718192021
  1. #nullable disable
  2. using System.Runtime.CompilerServices;
  3. namespace Jint.Native.Number.Dtoa
  4. {
  5. internal static class NumberExtensions
  6. {
  7. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  8. public static long UnsignedShift(this long l, int shift)
  9. {
  10. return (long) ((ulong) l >> shift);
  11. }
  12. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  13. public static ulong UnsignedShift(this ulong l, int shift)
  14. {
  15. return l >> shift;
  16. }
  17. }
  18. }