Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
remove `as_array` which hasnt been used since `organise`, add doc alias to `inflate`
  • Loading branch information
juliapaci committed Sep 27, 2024
1 parent 4823cb3 commit a92112d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

//! A 2D point.

use core::cmp::Ordering;
use core::fmt;
use core::ops::{Add, AddAssign, Sub, SubAssign};

Expand Down
7 changes: 1 addition & 6 deletions src/triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ impl Triangle {
}

/// Expand the triangle by a constant amount (`scalar`) in all directions
#[doc(alias = "offset")]
pub fn inflate(&self, scalar: f64) -> Self {
let centroid = self.centroid();

Expand All @@ -166,12 +167,6 @@ impl Triangle {
pub fn is_nan(&self) -> bool {
self.a.is_nan() || self.b.is_nan() || self.c.is_nan()
}

/// [`Triangle`]'s vertices as an array of Points
#[inline]
pub fn as_array(&self) -> [Point; 3] {
[self.a, self.b, self.c]
}
}

impl From<(Point, Point, Point)> for Triangle {
Expand Down

0 comments on commit a92112d

Please sign in to comment.