Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

Vector4.Create Method

Definition

Namespace:
System.Numerics
Assemblies:
netstandard.dll, System.Numerics.Vectors.dll

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

NameDescription
Create(Single, Single, Single, Single)

Creates a vector whose elements have the specified values.

Create(ReadOnlySpan<Single>)

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

Create(Single)

Creates a newVector4 object whose four elements have the same value.

Create(Vector3, Single)

Constructs a newVector4 object from the specifiedVector3 object and a W component.

Create(Vector2, Single, Single)

Creates a newVector4 object from the specifiedVector2 object and a Z and a W component.

Create(Single, Single, Single, Single)

Source:
Vector4.cs

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 theX field.

y
Single

The value to assign to theY field.

z
Single

The value to assign to theZ field.

w
Single

The value to assign to theW field.

Returns

A newVector4 whose elements have the specified values.

Applies to

Create(ReadOnlySpan<Single>)

Source:
Vector4.cs

Constructs a vector from the givenReadOnlySpan<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 newVector4 whose elements have the specified values.

Applies to

Create(Single)

Source:
Vector4.cs

Creates a newVector4 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 newVector4 whose four elements have the same value.

Applies to

Create(Vector3, Single)

Source:
Vector4.cs

Constructs a newVector4 object from the specifiedVector3 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 newVector4 from the specifiedVector3 object and a W component.

Applies to

Create(Vector2, Single, Single)

Source:
Vector4.cs

Creates a newVector4 object from the specifiedVector2 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 newVector4 from the specifiedVector2 object and a Z and a W component.

Applies to

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?