rene 0.2.0

Computational geometry.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::cmp::Ordering;

use super::types::Point;

impl<Scalar: PartialOrd> PartialOrd for Point<Scalar> {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        match self.x.partial_cmp(&other.x)? {
            Ordering::Equal => self.y.partial_cmp(&other.y),
            ordering => Some(ordering),
        }
    }
}