[]
        
(Showing Draft Content)

C1.Util.DX.Vector2.-ctor

Vector2 Constructor

Vector2(float)

Initializes a new instance of the Vector2 struct.

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

The value that will be assigned to all components.

Vector2(float, float)

Initializes a new instance of the Vector2 struct.

Declaration
public Vector2(float x, float y)
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.

Vector2(float[])

Initializes a new instance of the Vector2 struct.

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

The values to assign to the X and Y components of the vector. This must be an array with two elements.

Exceptions
Type Condition
ArgumentNullException

Thrown when values is null.

ArgumentOutOfRangeException

Thrown when values contains more or less than two elements.