Pos

Struct Pos 

Source
pub struct Pos<T: Sized + Add + Mul + Div + Sub>(pub T, pub T);
Expand description

Location on the plan (x, y)

Tuple Fields§

§0: T§1: T

Implementations§

Source§

impl Pos<i16>

Source

pub fn next_pos_turn(&self, t: Angle, a: Angle, d: Distance) -> Pos<i16>

Return another Pos depending of an angle and a Pos

t is the heading angle

a is the turn angle

d is the distance

Source§

impl Pos<i32>

Source

pub fn next_pos_turn(&self, t: Angle, a: Angle, d: Distance) -> Pos<i32>

Return another Pos depending of an angle and a Pos

t is the heading angle

a is the turn angle

d is the distance

Source§

impl Pos<i64>

Source

pub fn next_pos_turn(&self, t: Angle, a: Angle, d: Distance) -> Pos<i64>

Return another Pos depending of an angle and a Pos

t is the heading angle

a is the turn angle

d is the distance

Source§

impl Pos<i128>

Source

pub fn next_pos_turn(&self, t: Angle, a: Angle, d: Distance) -> Pos<i128>

Return another Pos depending of an angle and a Pos

t is the heading angle

a is the turn angle

d is the distance

Source§

impl Pos<f64>

Source

pub fn next_pos_turn(&self, t: Angle, a: Angle, d: Distance) -> Pos<f64>

Return another Pos depending of an angle and a Pos

t is the heading angle

a is the turn angle

d is the distance

Trait Implementations§

Source§

impl<T: Clone + Sized + Add + Mul + Div + Sub> Clone for Pos<T>

Source§

fn clone(&self) -> Pos<T>

Returns a duplicate 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 Default for Pos<f64>

Source§

fn default() -> Self

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

impl Default for Pos<i128>

Source§

fn default() -> Self

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

impl Default for Pos<i16>

Source§

fn default() -> Self

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

impl Default for Pos<i32>

Source§

fn default() -> Self

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

impl Default for Pos<i64>

Source§

fn default() -> Self

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

impl From<(f64, f64)> for Pos<f64>

Source§

fn from(tuple: (f64, f64)) -> Self

Converts to this type from the input type.
Source§

impl From<(i128, i128)> for Pos<i128>

Source§

fn from(tuple: (i128, i128)) -> Self

Converts to this type from the input type.
Source§

impl From<(i16, i16)> for Pos<i16>

Source§

fn from(tuple: (i16, i16)) -> Self

Converts to this type from the input type.
Source§

impl From<(i32, i32)> for Pos<i32>

Source§

fn from(tuple: (i32, i32)) -> Self

Converts to this type from the input type.
Source§

impl From<(i64, i64)> for Pos<i64>

Source§

fn from(tuple: (i64, i64)) -> Self

Converts to this type from the input type.
Source§

impl Into<(f64, f64)> for Pos<f64>

Source§

fn into(self) -> (f64, f64)

Converts this type into the (usually inferred) input type.
Source§

impl Into<(i128, i128)> for Pos<i128>

Source§

fn into(self) -> (i128, i128)

Converts this type into the (usually inferred) input type.
Source§

impl Into<(i16, i16)> for Pos<i16>

Source§

fn into(self) -> (i16, i16)

Converts this type into the (usually inferred) input type.
Source§

impl Into<(i32, i32)> for Pos<i32>

Source§

fn into(self) -> (i32, i32)

Converts this type into the (usually inferred) input type.
Source§

impl Into<(i64, i64)> for Pos<i64>

Source§

fn into(self) -> (i64, i64)

Converts this type into the (usually inferred) input type.
Source§

impl<T: Copy + Sized + Add + Mul + Div + Sub> Copy for Pos<T>

Auto Trait Implementations§

§

impl<T> Freeze for Pos<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Pos<T>
where T: RefUnwindSafe,

§

impl<T> Send for Pos<T>
where T: Send,

§

impl<T> Sync for Pos<T>
where T: Sync,

§

impl<T> Unpin for Pos<T>
where T: Unpin,

§

impl<T> UnwindSafe for Pos<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.