mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix random heading function, randomize wind better (#1619)
* Fix random heading function, randomize wind better * Use 359 as max default for random heading, for uniform distribution
This commit is contained in:
@@ -224,7 +224,7 @@ class Heading:
|
||||
return cls(Heading.reduce_angle(deg))
|
||||
|
||||
@classmethod
|
||||
def random(cls, min_angle: int = 0, max_angle: int = 0) -> Heading:
|
||||
def random(cls, min_angle: int = 0, max_angle: int = 359) -> Heading:
|
||||
return Heading.from_degrees(random.randint(min_angle, max_angle))
|
||||
|
||||
def __add__(self, other: Heading) -> Heading:
|
||||
|
||||
Reference in New Issue
Block a user