1 2 3 4 5 6 7 8 9 10 11 12 13 14
macro_rules! quick_n_mul { ( $n:ty, $geom:ty ) => { impl ::std::ops::Mul<$geom> for $n { type Output = $geom; #[inline(always)] fn mul(self, other: $geom) -> $geom { other * self } } }; } pub(crate) use quick_n_mul;