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

◆ Transform() [8/16]

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

Definition at line 465 of file Vector4.cs.

466 {
467 float num = rotation.X + rotation.X;
468 float num2 = rotation.Y + rotation.Y;
469 float num3 = rotation.Z + rotation.Z;
470 float num4 = rotation.W * num;
471 float num5 = rotation.W * num2;
472 float num6 = rotation.W * num3;
473 float num7 = rotation.X * num;
474 float num8 = rotation.X * num2;
475 float num9 = rotation.X * num3;
476 float num10 = rotation.Y * num2;
477 float num11 = rotation.Y * num3;
478 float num12 = rotation.Z * num3;
479 float x = value.X * (1f - num10 - num12) + value.Y * (num8 - num6);
480 float y = value.X * (num8 + num6) + value.Y * (1f - num7 - num12);
481 float z = value.X * (num9 - num5) + value.Y * (num11 + num4);
482 Vector4 result = default(Vector4);
483 result.X = x;
484 result.Y = y;
485 result.Z = z;
486 result.W = 1f;
487 return result;
488 }
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.