openrr_base

Type Alias BaseAcceleration

Source
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

Source

pub fn new(x: f64, y: f64, theta: f64) -> BaseVelocity

Trait Implementations

Source§

impl Clone for BaseVelocity

Source§

fn clone(&self) -> BaseVelocity

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BaseVelocity

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for BaseVelocity

Source§

fn default() -> BaseVelocity

Returns the “default value” for a type. Read more
Source§

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§

type Output = BaseVelocity

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f64) -> <BaseVelocity as Mul<f64>>::Output

Performs the * operation. Read more
Source§

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)

Performs the *= operation. Read more
Source§

impl Copy for BaseVelocity