-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathtemperature.py
More file actions
42 lines (39 loc) · 912 Bytes
/
temperature.py
File metadata and controls
42 lines (39 loc) · 912 Bytes
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
# -*- coding: utf-8 -*-
"""
"""
from __future__ import absolute_import
from ..unitquantity import UnitTemperature
K = degK = kelvin = Kelvin = UnitTemperature(
'Kelvin',
symbol='K',
aliases=['degK', 'kelvin']
)
degR = rankine = Rankine = UnitTemperature(
'Rankine',
K/1.8,
symbol='degR',
u_symbol='°R',
aliases=['rankine']
)
degC = celsius = Celsius = UnitTemperature(
'Celsius',
K,
symbol='degC',
u_symbol='°C',
aliases=['celsius'],
doc='''
Unicode has special compatibility characters for ℃, but its use is
discouraged by the unicode consortium.
'''
)
degF = fahrenheit = Fahrenheit = UnitTemperature(
'Fahrenheit',
degR,
symbol='degF',
u_symbol='°F',
aliases=['fahrenheit'],
doc='''
Unicode has special compatibility characters for ℉, but its use is
discouraged by the unicode consortium.
'''
)