egui
egui copied to clipboard
`Debug` impl for `Vec2` discards important information
Describe the bug
Formatting a Vec2 with {:?} leads to its Debug impl to format both coordinates with {:.1}, which discards any decimal digits after the first.
https://github.com/emilk/egui/blob/a085d0b3a5a4aa70d7ca4ddedbcc9ed53c758b7b/crates/emath/src/vec2.rs#L485-L493
To Reproduce Steps to reproduce the behavior:
format!("{:?}", vec2(0.01, -0.01))"[0.0 -0.0]"
(untested)
Expected behavior
Formatting a value should not discard important information. Debug especially shouldn't be doing that.
Note that the Display impl does not have this problem.
should be fixed in: https://github.com/emilk/egui/pull/7089