Vector3.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 3 elements. |
Create(Single) |
Creates a new Vector3 object whose three elements have the same value. |
Create(Vector2, Single) |
Creates a new Vector3 object from the specified Vector2 object and a Z component. |
Create(Single, 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 3 elements.
public:
static System::Numerics::Vector3 Create(ReadOnlySpan<float> values);
public static System.Numerics.Vector3 Create (ReadOnlySpan<float> values);
static member Create : ReadOnlySpan<single> -> System.Numerics.Vector3
Public Shared Function Create (values As ReadOnlySpan(Of Single)) As Vector3
Parameters
- values
- ReadOnlySpan<Single>
The span of elements to assign to the vector.
Returns
A new Vector3 whose elements have the specified values.
Applies to
Create(Single)
Creates a new Vector3 object whose three elements have the same value.
public:
static System::Numerics::Vector3 Create(float value);
public static System.Numerics.Vector3 Create (float value);
static member Create : single -> System.Numerics.Vector3
Public Shared Function Create (value As Single) As Vector3
Parameters
- value
- Single
The value to assign to all three elements.
Returns
A new Vector3 whose three elements have the same value.
Applies to
Create(Vector2, Single)
public:
static System::Numerics::Vector3 Create(System::Numerics::Vector2 vector, float z);
public static System.Numerics.Vector3 Create (System.Numerics.Vector2 vector, float z);
static member Create : System.Numerics.Vector2 * single -> System.Numerics.Vector3
Public Shared Function Create (vector As Vector2, z As Single) As Vector3
Parameters
- vector
- Vector2
The vector to use for the X and Y components.
- z
- Single
The Z component.
Returns
A new Vector3 from the specified Vector2 object and a Z component.
Applies to
Create(Single, Single, Single)
Creates a vector whose elements have the specified values.
public:
static System::Numerics::Vector3 Create(float x, float y, float z);
public static System.Numerics.Vector3 Create (float x, float y, float z);
static member Create : single * single * single -> System.Numerics.Vector3
Public Shared Function Create (x As Single, y As Single, z As Single) As Vector3
Parameters
Returns
A new Vector3 whose elements have the specified values.