comparison weather_server/types.py @ 45:10bde12a9163 v0.2.2

duh don't convert k to k
author Paul Fisher <paul@pfish.zone>
date Tue, 01 Apr 2025 16:30:55 -0400
parents 4af79d69b12e
children
comparison
equal deleted inserted replaced
44:4ef6854446fe 45:10bde12a9163
46 def temp_f(self) -> float: 46 def temp_f(self) -> float:
47 return c_to_f(self.temp_c) 47 return c_to_f(self.temp_c)
48 48
49 @property 49 @property
50 def temp_k(self) -> float: 50 def temp_k(self) -> float:
51 return c_to_k(self.temp_k) 51 return c_to_k(self.temp_c)
52 52
53 @property 53 @property
54 def dew_point_c(self) -> float: 54 def dew_point_c(self) -> float:
55 gamma = self._gamma 55 gamma = self._gamma
56 return _MAGNUS_C * gamma / (_MAGNUS_B - gamma) 56 return _MAGNUS_C * gamma / (_MAGNUS_B - gamma)