XMBYTE2::XMBYTE2(float,float) function (directxpackedvector.h)

Initializes a new instance of XMBYTE2 from two float arguments.

This constructor initializes a new instance of XMBYTE2 from two float arguments.

Note  This constructor is only available with C++.
 

Syntax

void XMBYTE2(
  float _x,
  float _y
) noexcept;

Parameters

_x

Value of the x-coordinate of the vector, the x member of the new XMBYTE2 instance.

_y

Value of the y-coordinate of the vector, the y member of the new XMBYTE2 instance.

Return value

None

Remarks

The magnitude of each 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:


	XMBYTE2 instance;

	instance.x = (int8_t)min( max( _x, -127.0 ), 127.0 );
	instance.y = (int8_t)min( max( _y, -127.0 ), 127.0 );
    

Requirements

Requirement Value
Target Platform Windows
Header directxpackedvector.h

See also

Reference

XMBYTE2

XMBYTE2 Constructors