Vector.WithElement メソッド

定義

オーバーロード

名前 説明
WithElement(Vector2, Int32, Single)

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

WithElement(Vector3, Int32, Single)

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

WithElement(Vector4, Int32, Single)

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

WithElement<T>(Vector<T>, Int32, T)

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector<T> を作成します。

WithElement(Vector2, Int32, Single)

ソース:
Vector2.Extensions.cs
ソース:
Vector2.Extensions.cs

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Vector2 WithElement(System::Numerics::Vector2 vector, int index, float value);
public static System.Numerics.Vector2 WithElement(this System.Numerics.Vector2 vector, int index, float value);
static member WithElement : System.Numerics.Vector2 * int * single -> System.Numerics.Vector2
<Extension()>
Public Function WithElement (vector As Vector2, index As Integer, value As Single) As Vector2

パラメーター

vector
Vector2

残りの要素を取得するベクター。

index
Int32

設定する要素のインデックス。

value
Single

要素を設定する値。

返品

indexの要素の値がvalueに設定され、残りの要素がvectorと同じ値に設定されたVector128<T>

適用対象

WithElement(Vector3, Int32, Single)

ソース:
Vector3.Extensions.cs
ソース:
Vector3.Extensions.cs

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Vector3 WithElement(System::Numerics::Vector3 vector, int index, float value);
public static System.Numerics.Vector3 WithElement(this System.Numerics.Vector3 vector, int index, float value);
static member WithElement : System.Numerics.Vector3 * int * single -> System.Numerics.Vector3
<Extension()>
Public Function WithElement (vector As Vector3, index As Integer, value As Single) As Vector3

パラメーター

vector
Vector3

残りの要素を取得するベクター。

index
Int32

設定する要素のインデックス。

value
Single

要素を設定する値。

返品

indexの要素の値がvalueに設定され、残りの要素がvectorと同じ値に設定されたVector128<T>

適用対象

WithElement(Vector4, Int32, Single)

ソース:
Vector4.Extensions.cs
ソース:
Vector4.Extensions.cs

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector128<T> を作成します。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Vector4 WithElement(System::Numerics::Vector4 vector, int index, float value);
public static System.Numerics.Vector4 WithElement(this System.Numerics.Vector4 vector, int index, float value);
static member WithElement : System.Numerics.Vector4 * int * single -> System.Numerics.Vector4
<Extension()>
Public Function WithElement (vector As Vector4, index As Integer, value As Single) As Vector4

パラメーター

vector
Vector4

残りの要素を取得するベクター。

index
Int32

設定する要素のインデックス。

value
Single

要素を設定する値。

返品

indexの要素の値がvalueに設定され、残りの要素がvectorと同じ値に設定されたVector128<T>

適用対象

WithElement<T>(Vector<T>, Int32, T)

ソース:
Vector.cs
ソース:
Vector.cs
ソース:
Vector.cs
ソース:
Vector.cs

指定したインデックス位置にある要素を指定した値に設定し、残りの要素を指定されたベクター内の要素と同じ値に設定して、新しい Vector<T> を作成します。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Vector<T> WithElement(System::Numerics::Vector<T> vector, int index, T value);
public static System.Numerics.Vector<T> WithElement<T>(this System.Numerics.Vector<T> vector, int index, T value);
static member WithElement : System.Numerics.Vector<'T> * int * 'T -> System.Numerics.Vector<'T>
<Extension()>
Public Function WithElement(Of T) (vector As Vector(Of T), index As Integer, value As T) As Vector(Of T)

型パラメーター

T

ベクター内の要素の型。

パラメーター

vector
Vector<T>

残りの要素を取得するベクター。

index
Int32

設定する要素のインデックス。

value
T

要素を設定する値。

返品

indexの要素の値がvalueに設定され、残りの要素がvectorと同じ値に設定されたVector<T>

例外

index が 0 より小さいか、要素の数より大きかった。

vector (T) の種類はサポートされていません。

適用対象