Swizzle2

Trait Swizzle2 

Source
pub trait Swizzle2<T>
where T: Scalar,
{ // Required methods fn xx(&self) -> Vector2<T>; fn xy(&self) -> Vector2<T>; fn xz(&self) -> Vector2<T>; fn yx(&self) -> Vector2<T>; fn yy(&self) -> Vector2<T>; fn yz(&self) -> Vector2<T>; fn zx(&self) -> Vector2<T>; fn zy(&self) -> Vector2<T>; fn zz(&self) -> Vector2<T>; }
Expand description

Trait for 2D swizzle operations on vectors.

Provides methods to rearrange and duplicate vector components into 2D vectors using familiar shader-style syntax.

Required Methods§

Source

fn xx(&self) -> Vector2<T>

Source

fn xy(&self) -> Vector2<T>

Source

fn xz(&self) -> Vector2<T>

Source

fn yx(&self) -> Vector2<T>

Source

fn yy(&self) -> Vector2<T>

Source

fn yz(&self) -> Vector2<T>

Source

fn zx(&self) -> Vector2<T>

Source

fn zy(&self) -> Vector2<T>

Source

fn zz(&self) -> Vector2<T>

Implementors§

Source§

impl<T> Swizzle2<T> for Vector2<T>
where T: Scalar,

Source§

impl<T> Swizzle2<T> for Vector3<T>
where T: Scalar,

Source§

impl<T> Swizzle2<T> for Vector4<T>
where T: Scalar,