Browse Source

Remove some dead code

pull/83/head
Emil Ernerfeldt 4 years ago
parent
commit
22e442c613
  1. 5
      egui/src/math/mod.rs
  2. 8
      egui/src/math/vec2.rs
  3. 7
      egui/src/paint/fonts.rs

5
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.

8
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())
}

7
egui/src/paint/fonts.rs

@ -256,13 +256,6 @@ impl std::ops::Index<TextStyle> 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<Mutex<TextureAtlas>>,
pixels_per_point: f32,

Loading…
Cancel
Save