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

◆ TransformNormal() [4/4]

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

Definition at line 441 of file Vector2.cs.

442 {
443 if (sourceArray == null)
444 {
445 throw new ArgumentNullException("sourceArray");
446 }
447 if (destinationArray == null)
448 {
449 throw new ArgumentNullException("destinationArray");
450 }
451 if (destinationArray.Length < sourceArray.Length)
452 {
453 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
454 }
455 for (int i = 0; i < sourceArray.Length; i++)
456 {
457 float x = sourceArray[i].X;
458 float y = sourceArray[i].Y;
459 destinationArray[i].X = x * matrix.M11 + y * matrix.M21;
460 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22;
461 }
462 }

References System.destinationArray, Microsoft.Xna.Framework.FrameworkResources.NotEnoughTargetSize, and System.sourceArray.