decorum
decorum copied to clipboard
Add implementations for std::ops traits that work on references
For the Add trait, std has:
-
impl Add<f64> for f64 -
impl<'a> Add<f64> for &'a f64 -
impl<'_> Add<&'_ f64> for f64 -
impl<'_, '_> Add<&'_ f64> for &'_ f64
This PR adds the last three for ConstrainedFloat, for Add, Mul, Sub, Div, Rem.
It also add similar implementations for {Add,Mul,Sub,Div,Rem}Assign and Neg.