Vector4 Constructors
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.
Creates a new instance of the Vector4 structure.
Vector4(ReadOnlySpan<Single>) |
Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 4 elements. |
Vector4(Single) |
Creates a new Vector4 object whose four elements have the same value. |
Vector4(Vector3, Single) |
Constructs a new Vector4 object from the specified Vector3 object and a W component. |
Vector4(Vector2, Single, Single) |
Creates a new Vector4 object from the specified Vector2 object and a Z and a W component. |
Vector4(Single, Single, Single, Single) |
Creates a vector whose elements have the specified values. |
- Source:
- Vector4.cs
- Source:
- Vector4.cs
- Source:
- Vector4.cs
Constructs a vector from the given ReadOnlySpan<T>. The span must contain at least 4 elements.
public:
Vector4(ReadOnlySpan<float> values);
public Vector4(ReadOnlySpan<float> values);
new System.Numerics.Vector4 : ReadOnlySpan<single> -> System.Numerics.Vector4
Public Sub New (values As ReadOnlySpan(Of Single))
Parameters
- values
- ReadOnlySpan<Single>
The span of elements to assign to the vector.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | 6, 7, 8, 9, 10 |
- Source:
- Vector4.cs
- Source:
- Vector4.cs
- Source:
- Vector4.cs
Creates a new Vector4 object whose four elements have the same value.
public:
Vector4(float value);
public Vector4(float value);
new System.Numerics.Vector4 : single -> System.Numerics.Vector4
Public Sub New (value As Single)
Parameters
- value
- Single
The value to assign to all four elements.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
UWP | 10.0 |
- Source:
- Vector4.cs
- Source:
- Vector4.cs
- Source:
- Vector4.cs
public:
Vector4(System::Numerics::Vector3 value, float w);
public Vector4(System.Numerics.Vector3 value, float w);
new System.Numerics.Vector4 : System.Numerics.Vector3 * single -> System.Numerics.Vector4
Public Sub New (value As Vector3, w As Single)
Parameters
- value
- Vector3
The vector to use for the X, Y, and Z components.
- w
- Single
The W component.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
UWP | 10.0 |
- Source:
- Vector4.cs
- Source:
- Vector4.cs
- Source:
- Vector4.cs
public:
Vector4(System::Numerics::Vector2 value, float z, float w);
public Vector4(System.Numerics.Vector2 value, float z, float w);
new System.Numerics.Vector4 : System.Numerics.Vector2 * single * single -> System.Numerics.Vector4
Public Sub New (value As Vector2, z As Single, w As Single)
Parameters
- value
- Vector2
The vector to use for the X and Y components.
- z
- Single
The Z component.
- w
- Single
The W component.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
UWP | 10.0 |
- Source:
- Vector4.cs
- Source:
- Vector4.cs
- Source:
- Vector4.cs
Creates a vector whose elements have the specified values.
public:
Vector4(float x, float y, float z, float w);
public Vector4(float x, float y, float z, float w);
new System.Numerics.Vector4 : single * single * single * single -> System.Numerics.Vector4
Public Sub New (x As Single, y As Single, z As Single, w As Single)
Parameters
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: