From 9eff191bc0e3029e82cb641ed0dd695cdba1ad74 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 14 Aug 2023 11:28:26 +0200 Subject: [PATCH] Use `TAU` instead of the legacy `PI` --- crates/egui/src/widgets/plot/axis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/egui/src/widgets/plot/axis.rs b/crates/egui/src/widgets/plot/axis.rs index f71096e8f..d6220adcb 100644 --- a/crates/egui/src/widgets/plot/axis.rs +++ b/crates/egui/src/widgets/plot/axis.rs @@ -172,7 +172,7 @@ impl Widget for AxisWidget { .unwrap_or_else(|| ui.visuals().text_color()); let angle: f32 = match AXIS { X_AXIS => 0.0, - Y_AXIS => -std::f32::consts::PI * 0.5, + Y_AXIS => -std::f32::consts::TAU * 0.25, _ => unreachable!(), }; // select text_pos and angle depending on placement and orientation of widget