XMStoreFloat3SE

Stores an XMVECTOR in an XMFLOAT3SE.

Syntax

void XMStoreFloat3SE(
         XMFLOAT3SE *pDestination,
         XMVECTOR V
)  

Parameters

pDestination
Type: XMFLOAT3SE *

[out]

Address at which to store the data.

V
Type: XMVECTOR 

[in]

Vector containing the data to store.

Return value

None.

Remarks

The following pseudocode demonstrates the operation of the function.

  XMVECTOR N;

  static const XMVECTOR  Max = { 65472.f, 65427.f, 65427.f, 0 };
  N = XMVectorClamp(V, XMVectorZero(), Max);

  uint32_t m[3], e[3];
  ConvertToFloat14( N.x, &m[0], &e[0]);
  ConvertToFloat14( N.y, &m[1], &e[1]);
  ConvertToFloat14( N.z, &m[2], &e[2]);

  uint32_t T = XMMax( e[0], XMMax( e[1], e[2] ) );

  pDestination->xm = m[0] >> (T - e[0]);
  PDestination->ym = m[1] >> (T - e[1]);
  pDestination->zm = m[2] >> (T - e[2]);
  pDestination->e = T;  

If the three components are not close to each other in magnitude, the largest value(s) will set the exponent and the other components will be shifted to zero.

Requirements

Header: Declared in directxpackedvector.h.