Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WithElement< T >()

static Vector256< T > System.Runtime.Intrinsics.Vector256< T >.WithElement< T > ( this Vector256< T > vector,
int index,
T value )
inlinestatic
Type Constraints
T :struct 

Definition at line 906 of file Vector256.cs.

906 : struct
907 {
908 ThrowHelper.ThrowForUnsupportedIntrinsicsVectorBaseType<T>();
909 if ((uint)index >= (uint)Vector256<T>.Count)
910 {
911 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
912 }
913 Vector256<T> source = vector;
914 Unsafe.Add(ref Unsafe.As<Vector256<T>, T>(ref source), index) = value;
915 return source;
916 }

References System.Runtime.Intrinsics.Vector256< T >.Count, System.index, System.source, System.ThrowHelper.ThrowArgumentOutOfRangeException(), and System.value.