From 22e442c613fef2fd66068cf83a5d2d9eab8e60d4 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 27 Dec 2020 12:56:57 +0100 Subject: [PATCH] Remove some dead code --- egui/src/math/mod.rs | 5 ----- egui/src/math/vec2.rs | 8 -------- egui/src/paint/fonts.rs | 7 ------- 3 files changed, 20 deletions(-) diff --git a/egui/src/math/mod.rs b/egui/src/math/mod.rs index 680481d7..1dc2012a 100644 --- a/egui/src/math/mod.rs +++ b/egui/src/math/mod.rs @@ -109,11 +109,6 @@ where } } -/// For t=[0,1], returns [0,1] with a derivate of zero at both ends -pub fn ease_in_ease_out(t: f32) -> f32 { - 3.0 * t * t - 2.0 * t * t * t -} - /// Round a value to the given number of decimal places. pub fn round_to_decimals(value: f64, decimal_places: usize) -> f64 { // This is a stupid way of doing this, but stupid works. diff --git a/egui/src/math/vec2.rs b/egui/src/math/vec2.rs index 3c2dcd76..b4d58365 100644 --- a/egui/src/math/vec2.rs +++ b/egui/src/math/vec2.rs @@ -75,14 +75,6 @@ impl Vec2 { self.x * self.x + self.y * self.y } - pub fn distance(a: Self, b: Self) -> f32 { - (a - b).length() - } - - pub fn distance_sq(a: Self, b: Self) -> f32 { - (a - b).length_sq() - } - pub fn angled(angle: f32) -> Self { vec2(angle.cos(), angle.sin()) } diff --git a/egui/src/paint/fonts.rs b/egui/src/paint/fonts.rs index 0211ad52..66e6d948 100644 --- a/egui/src/paint/fonts.rs +++ b/egui/src/paint/fonts.rs @@ -256,13 +256,6 @@ impl std::ops::Index for Fonts { // ---------------------------------------------------------------------------- -#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub enum FontSource { - Family(FontFamily), - /// Emoji fonts are numbered from hight priority (0) and onwards - Emoji(usize), -} - struct FontImplCache { atlas: Arc>, pixels_per_point: f32,