NumberExtensions.cs 461 B

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