jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Text;
 
namespace HH.WMS.Utils.NPOI.Util
{
    public static class Operator
    {
        public static int UnsignedRightShift(int operand,int val)
        {
            if (operand > 0)
                return operand >> val;
            else
                return (int)(((uint)operand) >> val);
        }
        public static long UnsignedRightShift(long operand, int val)
        {
            if (operand > 0)
                return operand >> val;
            else
                return (long)(((ulong)operand) >> val);
        }
        public static short UnsignedRightShift(short operand, int val)
        {
            
            if (operand > 0)
                return (short)(operand >> val);
            else
                return (short)(((ushort)operand) >> val);
        }
        public static sbyte UnsignedRightShift(sbyte operand, int val)
        {
 
            if (operand > 0)
                return (sbyte)(operand >> val);
            else
                return (sbyte)(((byte)operand) >> val);
        }
    }
}