Closed dbookstaber closed 1 month ago
Is this done?
No
Sorting can be done in Shot's __post_init__. Hey guys, im new to open source. Im not a math guy, but i like guns. Can i try to commit to your project?
That would be great! The process to contribute:
Then the owner (@o-murphy) can review and accept your changes.
Sorting can be done in Shot's post_init. Hey guys, im new to open source. Im not a math guy, but i like guns. Can i try to commit to your project?
it shouldn't be difficult, I think it can be done in one line, but I would do it with some setter method, cause Shot dataclass ain't frozen and we have to sort winds each times it changes, not just on postinit
In the case of multiple winds:
TrajectoryCalc
assumes thatShot.winds[]
is sorted byWind.until_distance
(ascending). However right now we do not enforce that or even check whether that assumption is valid.What is the best way to handle this?