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

◆ TransformNormal() [3/4]

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

Definition at line 465 of file Vector2.cs.

466 {
467 if (sourceArray == null)
468 {
469 throw new ArgumentNullException("sourceArray");
470 }
471 if (destinationArray == null)
472 {
473 throw new ArgumentNullException("destinationArray");
474 }
475 if (sourceArray.Length < (long)sourceIndex + (long)length)
476 {
477 throw new ArgumentException(FrameworkResources.NotEnoughSourceSize);
478 }
479 if (destinationArray.Length < (long)destinationIndex + (long)length)
480 {
481 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
482 }
483 while (length > 0)
484 {
485 float x = sourceArray[sourceIndex].X;
486 float y = sourceArray[sourceIndex].Y;
487 destinationArray[destinationIndex].X = x * matrix.M11 + y * matrix.M21;
488 destinationArray[destinationIndex].Y = x * matrix.M12 + y * matrix.M22;
489 sourceIndex++;
491 length--;
492 }
493 }

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