package com.util;

import com.sys.SysData;

import android.content.Context;

public class UnitConversionUtil {
	//转换dip为px 
	public static int convertDIP2PX(Double dip) { 
	    return (int)(dip*SysData.scale + 0.5f*(dip>=0?1:-1)); 
	} 
	 
	//转换px为dip 
	public static int convertPX2DIP(int px) { 
	    return (int)(px/SysData.scale + 0.5f*(px>=0?1:-1)); 
	} 


}
