Muokkaa

Jaa


Vector2 Constructors

Definition

Creates a new Vector2 object.

Overloads

Vector2(ReadOnlySpan<Single>)

Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least two elements.

Vector2(Single)

Creates a new Vector2 object whose two elements have the same value.

Vector2(Single, Single)

Creates a vector whose elements have the specified values.

Vector2(ReadOnlySpan<Single>)

Source:
Vector2.cs
Source:
Vector2.cs
Source:
Vector2.cs

Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least two elements.

public:
 Vector2(ReadOnlySpan<float> values);
public Vector2 (ReadOnlySpan<float> values);
new System.Numerics.Vector2 : ReadOnlySpan<single> -> System.Numerics.Vector2
Public Sub New (values As ReadOnlySpan(Of Single))

Parameters

values
ReadOnlySpan<Single>

The span of elements to assign to the vector.

Applies to

Vector2(Single)

Source:
Vector2.cs
Source:
Vector2.cs
Source:
Vector2.cs

Creates a new Vector2 object whose two elements have the same value.

public:
 Vector2(float value);
public Vector2 (float value);
new System.Numerics.Vector2 : single -> System.Numerics.Vector2
Public Sub New (value As Single)

Parameters

value
Single

The value to assign to both elements.

Applies to

Vector2(Single, Single)

Source:
Vector2.cs
Source:
Vector2.cs
Source:
Vector2.cs

Creates a vector whose elements have the specified values.

public:
 Vector2(float x, float y);
public Vector2 (float x, float y);
new System.Numerics.Vector2 : single * single -> System.Numerics.Vector2
Public Sub New (x As Single, y As Single)

Parameters

x
Single

The value to assign to the X field.

y
Single

The value to assign to the Y field.

Applies to