Vector.WithElement Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
WithElement(Vector3, Int32, Single) | |
WithElement(Vector2, Int32, Single) | |
WithElement(Vector4, Int32, Single) | |
WithElement<T>(Vector<T>, Int32, T) |
Tworzy nowy Vector<T> element z określonym indeksem ustawionym na określoną wartość, a pozostałe elementy ustawione na tę samą wartość co w danym wektorze. |
WithElement(Vector3, Int32, Single)
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
Parametry
- vector
- Vector3
- index
- Int32
- value
- Single
Zwraca
Dotyczy
WithElement(Vector2, Int32, Single)
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
Parametry
- vector
- Vector2
- index
- Int32
- value
- Single
Zwraca
Dotyczy
WithElement(Vector4, Int32, Single)
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
Parametry
- vector
- Vector4
- index
- Int32
- value
- Single
Zwraca
Dotyczy
WithElement<T>(Vector<T>, Int32, T)
- Źródło:
- Vector.cs
- Źródło:
- Vector.cs
Tworzy nowy Vector<T> element z określonym indeksem ustawionym na określoną wartość, a pozostałe elementy ustawione na tę samą wartość co w danym wektorze.
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)
Parametry typu
- T
Typ elementów w wektorze.
Parametry
- vector
- Vector<T>
Wektor umożliwiający uzyskanie pozostałych elementów.
- index
- Int32
Indeks elementu do ustawienia.
- value
- T
Wartość, na która ma zostać ustawiona wartość elementu.
Zwraca
Element Vector<T> o wartości ustawionej index
na value
wartość i pozostałe elementy ustawione na tę samą wartość co w elemecie vector
.
Wyjątki
index
wartość była mniejsza niż zero lub większa niż liczba elementów.
Typ vector
(T
) nie jest obsługiwany.