-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvertions.py
More file actions
77 lines (56 loc) · 1.32 KB
/
Copy pathconvertions.py
File metadata and controls
77 lines (56 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
class Lengths(object):
@staticmethod
def angstrom_to_cm(angs=1):
return angs * 10e-8
@staticmethod
def cm_to_angstrom(cm=1):
return cm * 10e8
@staticmethod
def m_to_cm(m=1):
return m * 100
@staticmethod
def cm_to_m(cm=1):
return cm / 100
@staticmethod
def km_to_m(km=1):
return km * 1000
class Volumes(object):
@staticmethod
def m_to_cm(m3=1):
return m3 * 10e6
@staticmethod
def cm_to_m(cm3=1):
return cm3 * 10e-6
@staticmethod
def cm_to_angstrom(cm3=1):
return cm3 * 10e24
@staticmethod
def angstrom_cm_to(ang=1):
return ang * 10e-24
@staticmethod
def liter_to_m(l=1):
return l * 0.001
class Areas(object):
@staticmethod
def cm_to_m(cm=1):
return cm * 0.0001
class Pressures(object):
@staticmethod
def atm_to_pa(atm=1):
return atm * 101325
@staticmethod
def pa_to_atm(pa=1):
return pa * 9.86923267e-6
@staticmethod
def pa_to_mmHg(pa=1):
return pa * 0.007501
@staticmethod
def mmHg_to_pa(mmHg=1):
return mmHg * 133.322365
class Heat(object):
@staticmethod
def joul_to_cal(j):
return j * 0.239005736
@staticmethod
def cal_to_joul(cal):
return cal * 4.184