#[non_exhaustive]pub struct PathOffsets {
pub lateral: f64,
pub vertical: f64,
pub longitudinal: f64,
}Expand description
The displacement of an offset at one place, in its base’s frame:
lateral to the left, vertical along up, longitudinal along the
tangent (ADR 0082’s station offsets).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lateral: f64Along the lateral axis, positive to the left.
vertical: f64Along the section’s up.
longitudinal: f64Along the tangent.
Implementations§
Source§impl PathOffsets
impl PathOffsets
Sourcepub const fn new(lateral: f64, vertical: f64, longitudinal: f64) -> PathOffsets
pub const fn new(lateral: f64, vertical: f64, longitudinal: f64) -> PathOffsets
The displacement (lateral, vertical, longitudinal).
Sourcepub fn lerp(self, other: PathOffsets, u: f64) -> PathOffsets
pub fn lerp(self, other: PathOffsets, u: f64) -> PathOffsets
The displacement a fraction u of the way from self to other.
Trait Implementations§
Source§impl Clone for PathOffsets
impl Clone for PathOffsets
Source§fn clone(&self) -> PathOffsets
fn clone(&self) -> PathOffsets
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PathOffsets
Source§impl Debug for PathOffsets
impl Debug for PathOffsets
Source§impl Default for PathOffsets
impl Default for PathOffsets
Source§fn default() -> PathOffsets
fn default() -> PathOffsets
Returns the “default value” for a type. Read more
Source§impl PartialEq for PathOffsets
impl PartialEq for PathOffsets
impl StructuralPartialEq for PathOffsets
Auto Trait Implementations§
impl Freeze for PathOffsets
impl RefUnwindSafe for PathOffsets
impl Send for PathOffsets
impl Sync for PathOffsets
impl Unpin for PathOffsets
impl UnsafeUnpin for PathOffsets
impl UnwindSafe for PathOffsets
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more