s/scale/zoom/
This commit is contained in:
parent
9e78bcba86
commit
244f06de9b
1 changed files with 2 additions and 2 deletions
|
@ -21,13 +21,13 @@ def knots(ms: float) -> float:
|
||||||
|
|
||||||
class Hodograph():
|
class Hodograph():
|
||||||
def __init__(self, width, height):
|
def __init__(self, width, height):
|
||||||
self.scale = 1.2
|
self.zoom = 1.2
|
||||||
self.offset_x = 0.1
|
self.offset_x = 0.1
|
||||||
self.offset_y = 0.9
|
self.offset_y = 0.9
|
||||||
|
|
||||||
self.width = min(width, height)
|
self.width = min(width, height)
|
||||||
self.height = min(width, height)
|
self.height = min(width, height)
|
||||||
self.radius = min(width, height) * self.scale
|
self.radius = min(width, height) * self.zoom
|
||||||
|
|
||||||
def sample_to_screen(self, wind_speed: dir, wind_dir: float) -> tuple:
|
def sample_to_screen(self, wind_speed: dir, wind_dir: float) -> tuple:
|
||||||
r = self.radius * min(wind_speed, WIND_SPEED_MAX) / WIND_SPEED_MAX
|
r = self.radius * min(wind_speed, WIND_SPEED_MAX) / WIND_SPEED_MAX
|
||||||
|
|
Loading…
Add table
Reference in a new issue