mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-27 22:11:07 +00:00
12 lines
224 B
Python
12 lines
224 B
Python
|
class Converter:
|
||
|
base_px = 16
|
||
|
|
||
|
def __init__(self):
|
||
|
self.data = []
|
||
|
|
||
|
def px_to_rem(self, px):
|
||
|
return float(px) / self.base_px
|
||
|
|
||
|
def rem_to_px(self, rem):
|
||
|
return float(rem) * self.base_px
|