XMUBYTE4::XMUBYTE4(constuint8_t*) function (directxpackedvector.h)
Initializes a new instance of XMUBYTE4 from a four element float
array argument.
This constructor initializes a new instance of XMUBYTE4 from a four element float
array argument.
Note This constructor is only available under C++.
Syntax
void XMUBYTE4(
const uint8_t *pArray
) noexcept;
Parameters
pArray
Four element float array containing the values used to initialize the four components of a new instance of XMUBYTE4.
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 [0.0, 255.0].
The following pseudocode demonstrates the operation of this constructor:
XMUBYTE4 instance;
instance.x = (uint8_t)min( max( pArray[0] 0.0 ), 255.0 );
instance.y = (uint8_t)min( max( pArray[1] 0.0 ), 255.0 );
instance.z = (uint8_t)min( max( pArray[2] 0.0 ), 255.0 );
instance.w = (uint8_t)min( max( pArray[3] 0.0 ), 255.0 );
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directxpackedvector.h |