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

◆ Transform() [5/8]

static void Microsoft.Xna.Framework.Vector2.Transform ( Vector2[] sourceArray,
int sourceIndex,
ref Matrix matrix,
Vector2[] destinationArray,
int destinationIndex,
int length )
inlinestatic

Definition at line 411 of file Vector2.cs.

412 {
413 if (sourceArray == null)
414 {
415 throw new ArgumentNullException("sourceArray");
416 }
417 if (destinationArray == null)
418 {
419 throw new ArgumentNullException("destinationArray");
420 }
421 if (sourceArray.Length < (long)sourceIndex + (long)length)
422 {
423 throw new ArgumentException(FrameworkResources.NotEnoughSourceSize);
424 }
425 if (destinationArray.Length < (long)destinationIndex + (long)length)
426 {
427 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
428 }
429 while (length > 0)
430 {
431 float x = sourceArray[sourceIndex].X;
432 float y = sourceArray[sourceIndex].Y;
433 destinationArray[destinationIndex].X = x * matrix.M11 + y * matrix.M21 + matrix.M41;
434 destinationArray[destinationIndex].Y = x * matrix.M12 + y * matrix.M22 + matrix.M42;
435 sourceIndex++;
437 length--;
438 }
439 }

References System.destinationArray, System.destinationIndex, System.length, Microsoft.Xna.Framework.FrameworkResources.NotEnoughSourceSize, Microsoft.Xna.Framework.FrameworkResources.NotEnoughTargetSize, System.sourceArray, and System.sourceIndex.