nyx-space / hifitime

A high fidelity time management library in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Epoch and Duration should have a `min` and `max` function

ChristopherRabotin opened this issue · comments

commented

Currently if one wants the epoch before or after another epoch, the logic must be done manually:

            let start_epoch = if ephem1.start_epoch() < ephem2.start_epoch() {
                ephem2.start_epoch()
            } else {
                ephem1.start_epoch()
            };

This issue should allow for the following:

let start_epoch = ephem1.start_epoch().min(ephem2.start_epoch());