added a helper static method to calculate px from dip values