Open DusterTheFirst opened 1 year ago
Hi @DusterTheFirst !
The only reason is that it has not been added. A PR would be appreciated! If you just want to get it working you can do it manually:
let rem = r1.raw() % r2.raw();
This does however require that the rates are in the same base and that you then crate a new rate with the same base from the remainder.
Ping me if you want to give a PR a try and would like some guidance!
Need this too
sometimes it is useful to know if a frequency is a multiple of another frequency or of a specific integer, using the
std::ops::Rem
operator is the default way to check that. This trait does not seem to be implemented for any Rate types. Is there any reason for the omission, or is there another way to achieve this without the Rem operator?