Trait pythagore::traits::IsRangeEmpty
source · 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§
sourcefn is_range_empty(&self) -> bool
fn is_range_empty(&self) -> bool
Returns true if range is empty.
Implementations on Foreign Types§
source§impl<N> IsRangeEmpty for RangeTo<N>
impl<N> IsRangeEmpty for RangeTo<N>
Always return false for RangeTo
fn is_range_empty(&self) -> bool
source§impl<N> IsRangeEmpty for RangeFrom<N>
impl<N> IsRangeEmpty for RangeFrom<N>
Always return false for RangeFrom
fn is_range_empty(&self) -> bool
source§impl IsRangeEmpty for RangeFull
impl IsRangeEmpty for RangeFull
Always return false for RangeFull
fn is_range_empty(&self) -> bool
source§impl<N: PartialOrd> IsRangeEmpty for (Bound<N>, Bound<N>)
impl<N: PartialOrd> IsRangeEmpty for (Bound<N>, Bound<N>)
Return true if this bound tuple does not “contain” anything
fn is_range_empty(&self) -> bool
source§impl<N: PartialOrd> IsRangeEmpty for Range<N>
impl<N: PartialOrd> IsRangeEmpty for Range<N>
Return true for Range if start >= end
fn is_range_empty(&self) -> bool
source§impl<N> IsRangeEmpty for RangeToInclusive<N>
impl<N> IsRangeEmpty for RangeToInclusive<N>
Always return false for RangeToInclusive
fn is_range_empty(&self) -> bool
source§impl<N: PartialOrd> IsRangeEmpty for RangeInclusive<N>
impl<N: PartialOrd> IsRangeEmpty for RangeInclusive<N>
Returns true for RangeInclusive if start > end
fn is_range_empty(&self) -> bool
Implementors§
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());