Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of XMBYTE4 from a four element float array argument.
This constructor initializes a new instance of XMBYTE4 from a four element float array argument.
Syntax
void XMBYTE4(
const float *pArray
) noexcept;
Parameters
pArray
Four element float array containing the values used to initialize the four components of a new instance of XMBYTE4.
Return value
None
Remarks
The magnitude of each member of the pArray argument to the constructor will be clamped to the range supported by an 8-bit signed integer [-127.0, 127.0].
The following pseudocode demonstrates the operation of this constructor:
XMBYTE4 instance;
instance.x = (int8_t)min( max( pArray[0] -127.0 ), 127.0 );
instance.y = (int8_t)min( max( pArray[1] -127.0 ), 127.0 );
instance.z = (int8_t)min( max( pArray[2] -127.0 ), 127.0 );
instance.w = (int8_t)min( max( pArray[3] -127.0 ), 127.0 );
Requirements
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | directxpackedvector.h |