mirror of
https://github.com/PaddiM8/kalker.git
synced 2024-12-12 17:40:52 +01:00
Show estimates when printing vector and matrices
This commit is contained in:
parent
121e121724
commit
0f53a0d112
@ -215,7 +215,7 @@ impl std::fmt::Display for KalkValue {
|
||||
"({})",
|
||||
values
|
||||
.iter()
|
||||
.map(|x| x.to_string())
|
||||
.map(|x| x.estimate().unwrap_or_else(|| x.to_string()))
|
||||
.collect::<Vec<String>>()
|
||||
.join(", ")
|
||||
)
|
||||
@ -225,7 +225,7 @@ impl std::fmt::Display for KalkValue {
|
||||
let mut longest = 0;
|
||||
for row in rows {
|
||||
for value in row {
|
||||
let value_str = value.to_string();
|
||||
let value_str = value.estimate().unwrap_or_else(|| value.to_string());
|
||||
longest = longest.max(value_str.len());
|
||||
value_strings.push(format!("{},", value_str));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user