[][src]Trait directx_math::XMVectorPermute

pub trait XMVectorPermute: Sealed {
    fn XMVectorPermute(V1: XMVECTOR, V2: XMVECTOR) -> XMVECTOR;
}

Permutes the components of two vectors to create a new vector.

Required methods

fn XMVectorPermute(V1: XMVECTOR, V2: XMVECTOR) -> XMVECTOR

Permutes the components of two vectors to create a new vector.

Remarks

This function is a template version of XMVectorPermute where the Permute* arguments are template values.

let a = XMVectorSet(1.0, 2.0, 3.0, 4.0);
let b = XMVectorSet(5.0, 6.0, 7.0, 8.0);

let c = <(Permute0X, Permute0Z, Permute1X, Permute1Z)>::XMVectorPermute(a, b);
let d = XMVectorSet(1.0, 3.0, 5.0, 7.0);

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

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

Loading content...

Implementations on Foreign Types

impl<X: Permute, Y: Permute, Z: Permute, W: Permute> XMVectorPermute for (X, Y, Z, W)[src]

Loading content...

Implementors

Loading content...