Skip to main content

GetPosition

Trait GetPosition 

Source
pub trait GetPosition<T = float, const N: usize = 3>
where Vector<T, N>: Copy, T: Copy,
{ // Required method fn pos(&self) -> Vector<T, N>; // Provided methods fn x(&self) -> T where Vector<T, N>: HaveX<T> { ... } fn y(&self) -> T where Vector<T, N>: HaveY<T> { ... } fn z(&self) -> T where Vector<T, N>: HaveZ<T> { ... } fn w(&self) -> T where Vector<T, N>: HaveW<T> { ... } }

Required Methods§

Source

fn pos(&self) -> Vector<T, N>

Provided Methods§

Source

fn x(&self) -> T
where Vector<T, N>: HaveX<T>,

Source

fn y(&self) -> T
where Vector<T, N>: HaveY<T>,

Source

fn z(&self) -> T
where Vector<T, N>: HaveZ<T>,

Source

fn w(&self) -> T
where Vector<T, N>: HaveW<T>,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, G, T, Idx, const N: usize> GetPosition<Idx, N> for GridView<'a, G, T, Idx, N>
where G: IGrid<T, Idx, N>, Idx: Integer,

Source§

impl<'a, G, T, Idx, const N: usize> GetPosition<Idx, N> for GridViewMut<'a, G, T, Idx, N>
where G: IGrid<T, Idx, N>, Idx: Integer,

Source§

impl<T, Idx, const N: usize> GetPosition<Idx, N> for GridOf<T, Idx, N>
where Idx: Integer,

Source§

impl<T, const N: usize> GetPosition<T, N> for Rectangle<T, N>
where T: Number,

Source§

impl<T, const N: usize> GetPosition<T, N> for Vector<T, N>
where Self: Copy, T: Copy,

Source§

impl<T> GetPosition<T, 2> for SquareMatrix<T, 3>
where T: Copy,

Source§

impl<T> GetPosition<T> for SquareMatrix<T, 4>
where T: Copy,