Skip to content

Commit

Permalink
remove point comparisons
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
  • Loading branch information
juliapaci and DJMcNab authored Sep 23, 2024
1 parent 4f17103 commit 4d0afb9
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,29 +187,6 @@ impl Point {
self.x.is_nan() || self.y.is_nan()
}

/// The topmost [`Point`]
#[inline]
pub fn topmost(&self, other: &Self) -> Ordering {
self.y.total_cmp(&other.y)
}

/// The bottommost [`Point`]
#[inline]
pub fn bottommost(&self, other: &Self) -> Ordering {
other.y.total_cmp(&self.y)
}

/// The rightmost [`Point`]
#[inline]
pub fn rightmost(&self, other: &Self) -> Ordering {
self.x.total_cmp(&other.x)
}

/// The leftmost [`Point`]
#[inline]
pub fn leftmost(&self, other: &Self) -> Ordering {
other.x.total_cmp(&self.x)
}
}

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

0 comments on commit 4d0afb9

Please sign in to comment.