1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00
Files
egui/crates/emath
Trevor Gross 2fabde1396 Add a Display impl for Vec2, Pos2, and Rect (#4428)
These three types currently have a `Debug` implementation that only ever
prints one decimal point. Sometimes it is useful to see more of the
number, or otherwise have specific formatting.

Add `Display` implementations that pass the format specification to the
member `f32`s for an easier way to control what is shown when debugging.

This allows doing e.g. `ui.label(format!("{:.4}", rect * scale))` which
currently prints zeroes if scale is small.
2024-04-29 14:22:34 +02:00
..
2023-02-12 18:08:13 +01:00

emath - egui math library

Latest version Documentation unsafe forbidden MIT Apache

A bare-bones 2D math library with types and functions useful for GUI building.

Made for egui.