pub struct SRange { /* private fields */ }
Expand description
Directed, inclusive longitudinal (s value) range from s0 to s1.
Implementations§
Source§impl SRange
impl SRange
Sourcepub fn size(&self) -> f64
pub fn size(&self) -> f64
Get the size of the SRange
.
§Returns
The size of the range, which is the difference between s1 and s0.
Sourcepub fn with_s(&self) -> bool
pub fn with_s(&self) -> bool
Defines whether this SRange is in the direction of +s (i.e., s1() > s0()).
§Returns
A boolean indicating whether the SRange is in the direction of +s.
Sourcepub fn intersects(&self, s_range: &SRange, tolerance: f64) -> bool
pub fn intersects(&self, s_range: &SRange, tolerance: f64) -> bool
Sourcepub fn contains(&self, s_range: &SRange, tolerance: f64) -> bool
pub fn contains(&self, s_range: &SRange, tolerance: f64) -> bool
Determines whether this SRange contains s_range
.
§Arguments
s_range
- AnotherSRange
to check if it is contained within this SRange.tolerance
- A tolerance value to consider when checking for containment.
Sourcepub fn get_intersection(
&self,
s_range: &SRange,
tolerance: f64,
) -> Option<SRange>
pub fn get_intersection( &self, s_range: &SRange, tolerance: f64, ) -> Option<SRange>
Get the intersection of this SRange with s_range
.
§Arguments
s_range
- AnotherSRange
to get the intersection with.tolerance
- A tolerance value to consider when checking for intersection.
§Returns
An Option<SRange>
containing the intersection of this SRange with s_range
.
If the intersection is empty, it returns None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SRange
impl RefUnwindSafe for SRange
impl !Send for SRange
impl !Sync for SRange
impl Unpin for SRange
impl UnwindSafe for SRange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more