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

◆ CopyTo() [2/3]

readonly void System.Numerics.Vector2.CopyTo ( float[] array,
int index )
inline

Definition at line 299 of file Vector2.cs.

300 {
301 if (array == null)
302 {
303 throw new NullReferenceException(SR.Arg_NullArgumentNullRef);
304 }
305 if (index < 0 || index >= array.Length)
306 {
307 throw new ArgumentOutOfRangeException("index", SR.Format(SR.Arg_ArgumentOutOfRangeException, index));
308 }
309 if (array.Length - index < 2)
310 {
311 throw new ArgumentException(SR.Format(SR.Arg_ElementsInSourceIsGreaterThanDestination, index));
312 }
313 array[index] = X;
314 array[index + 1] = Y;
315 }

References System.SR.Arg_ArgumentOutOfRangeException, System.SR.Arg_ElementsInSourceIsGreaterThanDestination, System.SR.Arg_NullArgumentNullRef, System.array, System.SR.Format(), System.index, System.Numerics.Vector2.X, and System.Numerics.Vector2.Y.