[][src]Trait directx_math::XMVectorSwizzle

pub trait XMVectorSwizzle: Sealed {
    fn XMVectorSwizzle(V: XMVECTOR) -> XMVECTOR;
}

Swizzles a vector

Required methods

fn XMVectorSwizzle(V: XMVECTOR) -> XMVECTOR

Swizzles a vector.

Remarks

This function is a template version of XMVectorSwizzle where the Swizzle* arguments are template values.

let a = XMVectorSet(1.0, 2.0, 3.0, 4.0);
let b = <(SwizzleW, SwizzleZ, SwizzleY, SwizzleX)>::XMVectorSwizzle(a);
let c = XMVectorSet(4.0, 3.0, 2.0, 1.0);

assert_eq!(XMVectorGetX(b), XMVectorGetX(c));
assert_eq!(XMVectorGetY(b), XMVectorGetY(c));
assert_eq!(XMVectorGetZ(b), XMVectorGetZ(c));
assert_eq!(XMVectorGetW(b), XMVectorGetW(c));

https://docs.microsoft.com/en-us/windows/win32/dxmath/xmvectorswizzle-template

Loading content...

Implementations on Foreign Types

impl<X: Swizzle, Y: Swizzle, Z: Swizzle, W: Swizzle> XMVectorSwizzle for (X, Y, Z, W)[src]

Loading content...

Implementors

Loading content...