shape_core/elements/points/point_3d/display.rs
1use super::*;
2
3impl<T> Debug for Point3D<T>
4where
5 T: Debug,
6{
7 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
8 f.debug_struct("Point").field("x", &self.x).field("y", &self.y).field("y", &self.z).finish()
9 }
10}
11
12impl<T> Display for Point3D<T>
13where
14 T: Display,
15{
16 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
17 write!(f, "({}, {}, {})", self.x, self.y, self.z)
18 }
19}