pub type BaseAcceleration = BaseVelocity;
Aliased Type§
struct BaseAcceleration {
pub x: f64,
pub y: f64,
pub theta: f64,
}
Fields§
§x: f64
§y: f64
§theta: f64
Implementations
Source§impl BaseVelocity
impl BaseVelocity
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 more