diff --git a/src/geometry/point.rs b/src/geometry/point.rs index 306c18e5..1ccad408 100644 --- a/src/geometry/point.rs +++ b/src/geometry/point.rs @@ -458,16 +458,10 @@ where DefaultAllocator: Allocator, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{{")?; - - let mut it = self.coords.iter(); - - write!(f, "{}", *it.next().unwrap())?; - - for comp in it { - write!(f, ", {}", *comp)?; - } + let precision = f.precision().unwrap_or(3); + write!(f, "Point {{")?; + write!(f, "{:.*}", precision, self.coords)?; write!(f, "}}") } }