Remove some dead code
This commit is contained in:
parent
997103a910
commit
22e442c613
3 changed files with 0 additions and 20 deletions
|
@ -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.
|
/// Round a value to the given number of decimal places.
|
||||||
pub fn round_to_decimals(value: f64, decimal_places: usize) -> f64 {
|
pub fn round_to_decimals(value: f64, decimal_places: usize) -> f64 {
|
||||||
// This is a stupid way of doing this, but stupid works.
|
// This is a stupid way of doing this, but stupid works.
|
||||||
|
|
|
@ -75,14 +75,6 @@ impl Vec2 {
|
||||||
self.x * self.x + self.y * self.y
|
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 {
|
pub fn angled(angle: f32) -> Self {
|
||||||
vec2(angle.cos(), angle.sin())
|
vec2(angle.cos(), angle.sin())
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
struct FontImplCache {
|
||||||
atlas: Arc<Mutex<TextureAtlas>>,
|
atlas: Arc<Mutex<TextureAtlas>>,
|
||||||
pixels_per_point: f32,
|
pixels_per_point: f32,
|
||||||
|
|
Loading…
Reference in a new issue