pub struct InertialPosition { /* private fields */ }
Expand description
An Inertial Position.
Wrapper around C++ implementation maliput::api::InertialPosition
.
§Example
use maliput::api::InertialPosition;
let inertial_pos = InertialPosition::new(1.0, 2.0, 3.0);
println!("inertial_pos = {}", inertial_pos);
assert_eq!(inertial_pos.x(), 1.0);
assert_eq!(inertial_pos.y(), 2.0);
assert_eq!(inertial_pos.z(), 3.0);
Implementations§
Source§impl InertialPosition
impl InertialPosition
Sourcepub fn new(x: f64, y: f64, z: f64) -> InertialPosition
pub fn new(x: f64, y: f64, z: f64) -> InertialPosition
Create a new InertialPosition
with the given x
, y
, and z
components.
Sourcepub fn distance(&self, other: &InertialPosition) -> f64
pub fn distance(&self, other: &InertialPosition) -> f64
Get the distance between two InertialPosition
.
Trait Implementations§
Source§impl Add for InertialPosition
impl Add for InertialPosition
Source§type Output = InertialPosition
type Output = InertialPosition
The resulting type after applying the
+
operator.Source§fn add(self, other: InertialPosition) -> InertialPosition
fn add(self, other: InertialPosition) -> InertialPosition
Performs the
+
operation. Read moreSource§impl Debug for InertialPosition
impl Debug for InertialPosition
Source§impl Display for InertialPosition
impl Display for InertialPosition
Source§impl Mul<f64> for InertialPosition
impl Mul<f64> for InertialPosition
Source§type Output = InertialPosition
type Output = InertialPosition
The resulting type after applying the
*
operator.Source§impl PartialEq for InertialPosition
impl PartialEq for InertialPosition
Source§impl Sub for InertialPosition
impl Sub for InertialPosition
Source§type Output = InertialPosition
type Output = InertialPosition
The resulting type after applying the
-
operator.Source§fn sub(self, other: InertialPosition) -> InertialPosition
fn sub(self, other: InertialPosition) -> InertialPosition
Performs the
-
operation. Read moreimpl Eq for InertialPosition
Auto Trait Implementations§
impl Freeze for InertialPosition
impl RefUnwindSafe for InertialPosition
impl !Send for InertialPosition
impl !Sync for InertialPosition
impl Unpin for InertialPosition
impl UnwindSafe for InertialPosition
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