Vector2.Create Method

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Create(ReadOnlySpan<Single>)

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

Create(Single)

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

Create(Single, Single)

Creates a vector whose elements have the specified values.

Create(ReadOnlySpan<Single>)

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

public static System.Numerics.Vector2 Create (ReadOnlySpan<float> values);

Parameters

values
ReadOnlySpan<Single>

The span of elements to assign to the vector.

Returns

A new Vector2 whose elements have the specified values.

Applies to

.NET 9
Product Versions
.NET 9

Create(Single)

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

public static System.Numerics.Vector2 Create (float value);

Parameters

value
Single

The value to assign to all two elements.

Returns

A new Vector2 whose two elements have the same value.

Applies to

.NET 9
Product Versions
.NET 9

Create(Single, Single)

Creates a vector whose elements have the specified values.

public static System.Numerics.Vector2 Create (float x, float y);

Parameters

x
Single

The value to assign to the X field.

y
Single

The value to assign to the Y field.

Returns

A new Vector2 whose elements have the specified values.

Applies to

.NET 9
Product Versions
.NET 9