pub trait XMVectorPermute: Sealed {
// Required method
fn XMVectorPermute(V1: XMVECTOR, V2: XMVECTOR) -> XMVECTOR;
}Expand description
Permutes the components of two vectors to create a new vector.
Required Methods§
Sourcefn XMVectorPermute(V1: XMVECTOR, V2: XMVECTOR) -> XMVECTOR
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.