diff --git a/src/integer.rs b/src/integer.rs index c568d2a..bd43b63 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -489,6 +489,13 @@ impl TryFrom for Planar64{ } } } +impl std::fmt::Display for Planar64{ + fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ + write!(f,"{:.3}", + Into::::into(*self), + ) + } +} impl std::ops::Neg for Planar64{ type Output=Planar64; #[inline] @@ -832,6 +839,15 @@ impl TryFrom for Planar64Mat3{ }) } } +impl std::fmt::Display for Planar64Mat3{ + fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ + write!(f,"\n{:.3},{:.3},{:.3}\n{:.3},{:.3},{:.3}\n{:.3},{:.3},{:.3}", + Into::::into(self.x_axis.x()),Into::::into(self.x_axis.y()),Into::::into(self.x_axis.z()), + Into::::into(self.y_axis.x()),Into::::into(self.y_axis.y()),Into::::into(self.y_axis.z()), + Into::::into(self.z_axis.x()),Into::::into(self.z_axis.y()),Into::::into(self.z_axis.z()), + ) + } +} impl std::ops::Div for Planar64Mat3{ type Output=Planar64Mat3; #[inline]