Breyta

Deila með


Vector4.Create Method

Definition

Overloads

Create(ReadOnlySpan<Single>)

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

Create(Single)

Creates a new Vector4 object whose four elements have the same value.

Create(Vector3, Single)

Constructs a new Vector4 object from the specified Vector3 object and a W component.

Create(Vector2, Single, Single)

Creates a new Vector4 object from the specified Vector2 object and a Z and a W component.

Create(Single, 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 4 elements.

public:
 static System::Numerics::Vector4 Create(ReadOnlySpan<float> values);
public static System.Numerics.Vector4 Create (ReadOnlySpan<float> values);
static member Create : ReadOnlySpan<single> -> System.Numerics.Vector4
Public Shared Function Create (values As ReadOnlySpan(Of Single)) As Vector4

Parameters

values
ReadOnlySpan<Single>

The span of elements to assign to the vector.

Returns

A new Vector4 whose elements have the specified values.

Applies to

Create(Single)

Creates a new Vector4 object whose four elements have the same value.

public:
 static System::Numerics::Vector4 Create(float value);
public static System.Numerics.Vector4 Create (float value);
static member Create : single -> System.Numerics.Vector4
Public Shared Function Create (value As Single) As Vector4

Parameters

value
Single

The value to assign to all four elements.

Returns

A new Vector4 whose four elements have the same value.

Applies to

Create(Vector3, Single)

Constructs a new Vector4 object from the specified Vector3 object and a W component.

public:
 static System::Numerics::Vector4 Create(System::Numerics::Vector3 vector, float w);
public static System.Numerics.Vector4 Create (System.Numerics.Vector3 vector, float w);
static member Create : System.Numerics.Vector3 * single -> System.Numerics.Vector4
Public Shared Function Create (vector As Vector3, w As Single) As Vector4

Parameters

vector
Vector3

The vector to use for the X, Y, and Z components.

w
Single

The W component.

Returns

A new Vector4 from the specified Vector3 object and a W component.

Applies to

Create(Vector2, Single, Single)

Creates a new Vector4 object from the specified Vector2 object and a Z and a W component.

public:
 static System::Numerics::Vector4 Create(System::Numerics::Vector2 vector, float z, float w);
public static System.Numerics.Vector4 Create (System.Numerics.Vector2 vector, float z, float w);
static member Create : System.Numerics.Vector2 * single * single -> System.Numerics.Vector4
Public Shared Function Create (vector As Vector2, z As Single, w As Single) As Vector4

Parameters

vector
Vector2

The vector to use for the X and Y components.

z
Single

The Z component.

w
Single

The W component.

Returns

A new Vector4 from the specified Vector2 object and a Z and a W component.

Applies to

Create(Single, Single, Single, Single)

Creates a vector whose elements have the specified values.

public:
 static System::Numerics::Vector4 Create(float x, float y, float z, float w);
public static System.Numerics.Vector4 Create (float x, float y, float z, float w);
static member Create : single * single * single * single -> System.Numerics.Vector4
Public Shared Function Create (x As Single, y As Single, z As Single, w As Single) As Vector4

Parameters

x
Single

The value to assign to the X field.

y
Single

The value to assign to the Y field.

z
Single

The value to assign to the Z field.

w
Single

The value to assign to the W field.

Returns

A new Vector4 whose elements have the specified values.

Applies to