Struct arci::BaseVelocity
source · pub struct BaseVelocity {
pub x: f64,
pub y: f64,
pub theta: f64,
}
Fields§
§x: f64
§y: f64
§theta: f64
Implementations§
Trait Implementations§
source§impl Clone for BaseVelocity
impl Clone for BaseVelocity
source§fn clone(&self) -> BaseVelocity
fn clone(&self) -> BaseVelocity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BaseVelocity
impl Debug for BaseVelocity
source§impl Default for BaseVelocity
impl Default for BaseVelocity
source§fn default() -> BaseVelocity
fn default() -> BaseVelocity
Returns the “default value” for a type. Read more
source§impl Mul<f64> for BaseVelocity
impl Mul<f64> for BaseVelocity
Multiply scalar value for velocity
§Example
use assert_approx_eq::assert_approx_eq;
use arci::BaseVelocity;
let vel = BaseVelocity::new(0.1, -0.2, 1.0);
let twice = vel * 2.0;
assert_approx_eq!(twice.x, 0.2);
assert_approx_eq!(twice.y, -0.4);
assert_approx_eq!(twice.theta, 2.0);
source§impl MulAssign<f64> for BaseVelocity
impl MulAssign<f64> for BaseVelocity
Multiply scalar value for velocity
§Example
use assert_approx_eq::assert_approx_eq;
use arci::BaseVelocity;
let mut vel = BaseVelocity::new(0.1, -0.2, 1.0);
vel *= 2.0;
assert_approx_eq!(vel.x, 0.2);
assert_approx_eq!(vel.y, -0.4);
assert_approx_eq!(vel.theta, 2.0);
source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreimpl Copy for BaseVelocity
Auto Trait Implementations§
impl Freeze for BaseVelocity
impl RefUnwindSafe for BaseVelocity
impl Send for BaseVelocity
impl Sync for BaseVelocity
impl Unpin for BaseVelocity
impl UnwindSafe for BaseVelocity
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.