Skip to main content

oxiphysics_geometry/decimation/
meshedge_traits.rs

1//! # MeshEdge - Trait Implementations
2//!
3//! This module contains trait implementations for `MeshEdge`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Eq`
8//! - `PartialOrd`
9//! - `Ord`
10//!
11//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
12
13#[allow(unused_imports)]
14use super::functions::*;
15use super::types::MeshEdge;
16
17impl Eq for MeshEdge {}
18
19impl PartialOrd for MeshEdge {
20    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
21        Some(self.cmp(other))
22    }
23}
24
25impl Ord for MeshEdge {
26    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
27        other
28            .cost
29            .partial_cmp(&self.cost)
30            .unwrap_or(std::cmp::Ordering::Equal)
31    }
32}