[]
        
(Showing Draft Content)

C1.Util.DX.Vector4.-ctor

Vector4 Constructor

Vector4(float)

Initializes a new instance of the Vector4 struct.

Declaration
public Vector4(float value)
Parameters
Type Name Description
float value

The value that will be assigned to all components.

Vector4(float, float, float, float)

Initializes a new instance of the Vector4 struct.

Declaration
public Vector4(float x, float y, float z, float w)
Parameters
Type Name Description
float x

Initial value for the X component of the vector.

float y

Initial value for the Y component of the vector.

float z

Initial value for the Z component of the vector.

float w

Initial value for the W component of the vector.

Vector4(Vector3, float)

Initializes a new instance of the Vector4 struct.

Declaration
public Vector4(Vector3 value, float w)
Parameters
Type Name Description
Vector3 value

A vector containing the values with which to initialize the X, Y, and Z components.

float w

Initial value for the W component of the vector.

Vector4(Vector2, float, float)

Initializes a new instance of the Vector4 struct.

Declaration
public Vector4(Vector2 value, float z, float w)
Parameters
Type Name Description
Vector2 value

A vector containing the values with which to initialize the X and Y components.

float z

Initial value for the Z component of the vector.

float w

Initial value for the W component of the vector.

Vector4(float[])

Initializes a new instance of the Vector4 struct.

Declaration
public Vector4(float[] values)
Parameters
Type Name Description
float[] values

The values to assign to the X, Y, Z, and W components of the vector. This must be an array with four elements.

Exceptions
Type Condition
ArgumentNullException

Thrown when values is null.

ArgumentOutOfRangeException

Thrown when values contains more or less than four elements.