[−][src]Trait gridly::vector::VectorLike
Required methods
Loading content...Provided methods
fn manhattan_length(&self) -> isize
Return the Manhattan length of the vector
The Manhattan length of a vector is the sum of the absolute values of its components.
fn checked_manhattan_length(&self) -> Option<isize>
fn clockwise(&self) -> Vector
Return a new vector, rotated 90 degrees clockwise.
fn anticlockwise(&self) -> Vector
Return a new vector, rotated 90 degrees counterclockwise.
fn reverse(&self) -> Vector
fn get_component<T: Component>(&self) -> T
Generically get either the Rows or Columns of a vector
fn transpose(&self) -> Vector
Swap the rows and columns of this Vector
fn direction(&self) -> Option<Direction>
If the vector is pointing in an orthogonal direction, return that direction
Implementations on Foreign Types
impl VectorLike for (Rows, Columns)[src]
impl VectorLike for (Columns, Rows)[src]
impl VectorLike for (isize, isize)[src]
impl<'_, T: VectorLike> VectorLike for &'_ T[src]
Loading content...
Implementors
impl VectorLike for Direction[src]
A Direction acts like a unit vector in the given direction