Skip to content

Commit

Permalink
Merge pull request #266 from nyx-space/hotfix/prevent_traj_it_bug_msg
Browse files Browse the repository at this point in the history
Prevent calling every_between out of bounds
  • Loading branch information
ChristopherRabotin authored Dec 28, 2023
2 parents 5e50b7e + 0095e90 commit f8ba84a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 388 deletions.
Binary file removed docs/eclipse_computation.jpg
Binary file not shown.
Binary file removed docs/eclipse_penumbra.jpg
Binary file not shown.
375 changes: 0 additions & 375 deletions docs/eclipsing.lyx

This file was deleted.

Binary file removed docs/eclipsing.pdf
Binary file not shown.
10 changes: 0 additions & 10 deletions docs/index.html

This file was deleted.

6 changes: 5 additions & 1 deletion src/md/trajectory/traj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ where
/// Creates an iterator through the trajectory by the provided step size between the provided bounds
pub fn every_between(&self, step: Duration, start: Epoch, end: Epoch) -> TrajIterator<S> {
TrajIterator {
time_series: TimeSeries::inclusive(start, end, step),
time_series: TimeSeries::inclusive(
start.max(self.first().epoch()),
end.min(self.last().epoch()),
step,
),
traj: self,
}
}
Expand Down
Loading

0 comments on commit f8ba84a

Please sign in to comment.