mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
587a083db6
Co-authored-by: Atthaphon Urairat <aurairat@inetasia.com> Co-authored-by: Ayush Bhardwaj <classicayush@gmail.com>
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
|