diff options
| author | hachem <im@hachem.wtf> | 2024-10-03 21:52:32 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-10-03 21:52:32 +0200 |
| commit | c643b1535ffb106cf582763804bce655e3fb116c (patch) | |
| tree | 5a401882ca5c35b616d1c45b51fa3ef8729d71f1 /libpsi-core/src/maths/vector.rs | |
| parent | ca9fc67ccf7899244ba484c9c99a55985f1f36ac (diff) | |
Comments are for nerds
Diffstat (limited to 'libpsi-core/src/maths/vector.rs')
| -rw-r--r-- | libpsi-core/src/maths/vector.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpsi-core/src/maths/vector.rs b/libpsi-core/src/maths/vector.rs index f424e4e..cb25ecd 100644 --- a/libpsi-core/src/maths/vector.rs +++ b/libpsi-core/src/maths/vector.rs @@ -259,12 +259,12 @@ impl<T: Float + fmt::Display> fmt::Display for ColumnVector<T> { let max_width = self .0 .iter() - .map(|x| format!("{:.2}", x).split('.').next().unwrap().len()) // Length of integer part + .map(|x| format!("{:.2}", x).split('.').next().unwrap().len()) .max() .unwrap_or(0); for (i, x) in self.0.iter().enumerate() { - let formatted_x = format!("{:>width$.2}", x, width = max_width + 3); // +3 for ".00" + let formatted_x = format!("{:>width$.2}", x, width = max_width + 3); if i == 0 { write!(f, "┌{}┐\n", formatted_x)?; |
