pub trait IsRangeEmpty {
    // Required method
    fn is_range_empty(&self) -> bool;
}
Expand description

Tests to known if a range does not contain anything

Required Methods§

source

fn is_range_empty(&self) -> bool

Returns true if range is empty.

Implementations on Foreign Types§

source§

impl<N> IsRangeEmpty for RangeTo<N>

Always return false for RangeTo

source§

impl<N> IsRangeEmpty for RangeFrom<N>

Always return false for RangeFrom

source§

impl IsRangeEmpty for RangeFull

Always return false for RangeFull

source§

impl<N: PartialOrd> IsRangeEmpty for (Bound<N>, Bound<N>)

Return true if this bound tuple does not “contain” anything

source§

impl<N: PartialOrd> IsRangeEmpty for Range<N>

Return true for Range if start >= end

source§

impl<N> IsRangeEmpty for RangeToInclusive<N>

Always return false for RangeToInclusive

source§

impl<N: PartialOrd> IsRangeEmpty for RangeInclusive<N>

Returns true for RangeInclusive if start > end

Implementors§

source§

impl<N: Scalar + PartialOrd, const D: usize> IsRangeEmpty for BBox<N, D>

Returns true if bounding box cannot hold any point

Example

use nalgebra::point;
use pythagore::{BBox, IsRangeEmpty};

assert!(BBox::from(point![5, 5]..point![0, 0]).is_range_empty());