Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ Transform() [7/8]

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

Definition at line 387 of file Vector2.cs.

388 {
389 if (sourceArray == null)
390 {
391 throw new ArgumentNullException("sourceArray");
392 }
393 if (destinationArray == null)
394 {
395 throw new ArgumentNullException("destinationArray");
396 }
397 if (destinationArray.Length < sourceArray.Length)
398 {
399 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
400 }
401 for (int i = 0; i < sourceArray.Length; i++)
402 {
403 float x = sourceArray[i].X;
404 float y = sourceArray[i].Y;
405 destinationArray[i].X = x * matrix.M11 + y * matrix.M21 + matrix.M41;
406 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22 + matrix.M42;
407 }
408 }

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