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

[emath] Use const values for Vec2::ZERO, Rect::EVERYTHING etc

This commit is contained in:
Emil Ernerfeldt
2021-02-05 09:49:21 +01:00
parent 10e86b055d
commit 2d9d06dbff
20 changed files with 118 additions and 71 deletions

View File

@@ -28,8 +28,12 @@ impl Default for Rot2 {
}
impl Rot2 {
/// The identity rotation: nothing rotates
pub const IDENTITY: Self = Self { s: 0.0, c: 1.0 };
#[deprecated = "Use Rot2::IDENTITY"]
pub fn identity() -> Self {
Self { s: 0.0, c: 1.0 }
Self::IDENTITY
}
/// A 𝞃/4 = 90° rotation means rotating the X axis to the Y axis.