Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
223 ligi 1
package org.ligi.ufo;
2
 
3
public final class MKHelper
4
{
5
    public final static int parse_signed_int_2(int i1,int i2)
6
    {
7
        int res=(int)((i2<<8)|i1);
8
        if ((res&(1<<15))!=0)
9
            return -(res&(0xFFFF-1))^(0xFFFF-1);
10
        else
11
            return res;
12
 
13
    }
14
 
15
 
16
   public final static int parse_unsigned_int_2(int i1,int i2)
17
    {
18
        return (int)((i2<<8)|i1);
19
    }
20
 
21
}