Move function to be closer to its caller

This commit is contained in:
XANTRONIX 2025-02-23 21:37:24 -05:00
parent 9657f85090
commit 8240597ddb

View file

@ -56,12 +56,6 @@ class SkewT():
return factor * self.height
def sample_to_graph(self, temp: float, pressure: float):
x = (temp / TEMP_STEP) * self.temp_step_width
y = self.pressure_y(pressure)
return x + y, y
def draw_isobars(self, cr: cairo.Context, x: float, y: float):
for pressure in range(PRESSURE_MIN, PRESSURE_MAX+1, PRESSURE_STEP):
coord = self.graph_to_screen(-self.width / 2,
@ -88,6 +82,12 @@ class SkewT():
cr.line_to(x + screen_x2, y + screen_y2)
cr.stroke()
def sample_to_graph(self, temp: float, pressure: float):
x = (temp / TEMP_STEP) * self.temp_step_width
y = self.pressure_y(pressure)
return x + y, y
def draw_samples(self,
cr: cairo.Context,
x: float,