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);
public static System.Numerics.Vector2 Create (ReadOnlySpan<float> values);
static member Create : ReadOnlySpan<single> -> System.Numerics.Vector2
Public Shared Function Create (values As ReadOnlySpan(Of Single)) As Vector2
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
Create(Single)
Creates a new Vector2 object whose two elements have the same value.
public:
static System::Numerics::Vector2 Create(float value);
public static System.Numerics.Vector2 Create (float value);
static member Create : single -> System.Numerics.Vector2
Public Shared Function Create (value As Single) As Vector2
Parameters
- value
- Single
The value to assign to all two elements.
Returns
A new Vector2 whose two elements have the same value.
Applies to
Create(Single, Single)
Creates a vector whose elements have the specified values.
public:
static System::Numerics::Vector2 Create(float x, float y);
public static System.Numerics.Vector2 Create (float x, float y);
static member Create : single * single -> System.Numerics.Vector2
Public Shared Function Create (x As Single, y As Single) As Vector2
Parameters
Returns
A new Vector2 whose elements have the specified values.