pub struct ClimbLength { /* private fields */ }Expand description
How much a climb through a vertical connector adds to a route’s length.
Implementations§
Source§impl ClimbLength
impl ClimbLength
Sourcepub fn try_new(
measure: StairLength,
vertical_factor: f64,
) -> Result<Self, MetricRoutingError>
pub fn try_new( measure: StairLength, vertical_factor: f64, ) -> Result<Self, MetricRoutingError>
Validates a finite, non-negative vertical factor.
§Errors
MetricRoutingError::InvalidClimb otherwise.
Sourcepub fn slope() -> Self
pub fn slope() -> Self
The true slope length: StairLength::Slope with a factor of one.
Sourcepub fn measure(&self) -> StairLength
pub fn measure(&self) -> StairLength
How the climb is measured.
Sourcepub fn vertical_factor(&self) -> f64
pub fn vertical_factor(&self) -> f64
What a metre of rise counts.
Sourcepub fn length(
&self,
horizontal: LengthInterval,
rise: LengthInterval,
) -> LengthInterval
pub fn length( &self, horizontal: LengthInterval, rise: LengthInterval, ) -> LengthInterval
Bounds the length of a climb whose plan length and rise lie in the given intervals. Both measures grow with either, so the bounds come from the ends, rounded outwards.
Trait Implementations§
Source§impl Clone for ClimbLength
impl Clone for ClimbLength
impl Copy for ClimbLength
Source§impl Debug for ClimbLength
impl Debug for ClimbLength
Source§impl PartialEq for ClimbLength
impl PartialEq for ClimbLength
impl StructuralPartialEq for ClimbLength
Auto Trait Implementations§
impl Freeze for ClimbLength
impl RefUnwindSafe for ClimbLength
impl Send for ClimbLength
impl Sync for ClimbLength
impl Unpin for ClimbLength
impl UnsafeUnpin for ClimbLength
impl UnwindSafe for ClimbLength
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