1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Implement rotating text

Closes https://github.com/emilk/egui/issues/428
This commit is contained in:
Emil Ernerfeldt
2021-09-05 09:06:53 +02:00
parent 6902151a96
commit 14c989fdfa
12 changed files with 112 additions and 69 deletions

View File

@@ -33,6 +33,7 @@ impl Rot2 {
/// The identity rotation: nothing rotates
pub const IDENTITY: Self = Self { s: 0.0, c: 1.0 };
/// Angle is clockwise in radians.
/// A 𝞃/4 = 90° rotation means rotating the X axis to the Y axis.
pub fn from_angle(angle: f32) -> Self {
let (s, c) = angle.sin_cos();