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

◆ Transform() [11/16]

static Vector4 Microsoft.Xna.Framework.Vector4.Transform ( Vector4 value,
Quaternion rotation )
inlinestatic

Definition at line 561 of file Vector4.cs.

562 {
563 float num = rotation.X + rotation.X;
564 float num2 = rotation.Y + rotation.Y;
565 float num3 = rotation.Z + rotation.Z;
566 float num4 = rotation.W * num;
567 float num5 = rotation.W * num2;
568 float num6 = rotation.W * num3;
569 float num7 = rotation.X * num;
570 float num8 = rotation.X * num2;
571 float num9 = rotation.X * num3;
572 float num10 = rotation.Y * num2;
573 float num11 = rotation.Y * num3;
574 float num12 = rotation.Z * num3;
575 float x = value.X * (1f - num10 - num12) + value.Y * (num8 - num6) + value.Z * (num9 + num5);
576 float y = value.X * (num8 + num6) + value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
577 float z = value.X * (num9 - num5) + value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
578 Vector4 result = default(Vector4);
579 result.X = x;
580 result.Y = y;
581 result.Z = z;
582 result.W = value.W;
583 return result;
584 }
Vector4(float x, float y, float z, float w)
Definition Vector4.cs:49

References System.value, Microsoft.Xna.Framework.Quaternion.X, Microsoft.Xna.Framework.Quaternion.Y, and Microsoft.Xna.Framework.Quaternion.Z.