From 781504732907324728f88e80d8c2680c1763288d Mon Sep 17 00:00:00 2001 From: Sebastian K Date: Tue, 7 Jul 2020 21:17:24 +0300 Subject: [PATCH] merge --- content/src/outline.rs | 13 ------------- geometry/src/vector.rs | 23 ----------------------- 2 files changed, 36 deletions(-) diff --git a/content/src/outline.rs b/content/src/outline.rs index 739bc20e..9be1ca74 100644 --- a/content/src/outline.rs +++ b/content/src/outline.rs @@ -72,14 +72,6 @@ impl Outline { } } - #[inline] - pub fn with_capacity(capacity: usize) -> Outline { - Outline { - contours: Vec::with_capacity(capacity), - bounds: RectF::default(), - } - } - #[inline] pub fn from_segments(segments: I) -> Outline where @@ -143,11 +135,6 @@ impl Outline { outline } - #[inline] - pub fn len(&self) -> usize { - self.contours.len() - } - #[inline] pub fn bounds(&self) -> RectF { self.bounds diff --git a/geometry/src/vector.rs b/geometry/src/vector.rs index a722dcd0..fa864f5d 100644 --- a/geometry/src/vector.rs +++ b/geometry/src/vector.rs @@ -178,29 +178,6 @@ impl Vector2F { pub fn to_i32(self) -> Vector2I { Vector2I(self.0.to_i32x2()) } - - /// Returns the inverse vector - /// - /// `v ยท v.inv() = (1.0, 1.0)` - #[inline] - pub fn inv(self) -> Vector2F { - Vector2F::new(1.0 / self.x(), 1.0 / self.y()) - } - - /// Returns the angle of the vector - /// - /// The angle will be in [-PI, PI] - #[inline] - pub fn phi(self) -> f32 { - self.y().atan2(self.x()) - } - - /// Compute the angle between `self` and `other` - /// - /// The angle will be in [-PI, PI] - pub fn angle_to(self, other: Vector2F) -> f32 { - (self.dot(other) / (self.square_length() * other.square_length()).sqrt()).acos() * self.det(other).signum() - } } /// A convenience alias for `Vector2F::new()`.