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

◆ Transform() [4/8]

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

Definition at line 353 of file Vector2.cs.

354 {
355 float num = rotation.X + rotation.X;
356 float num2 = rotation.Y + rotation.Y;
357 float num3 = rotation.Z + rotation.Z;
358 float num4 = rotation.W * num3;
359 float num5 = rotation.X * num;
360 float num6 = rotation.X * num2;
361 float num7 = rotation.Y * num2;
362 float num8 = rotation.Z * num3;
363 float x = value.X * (1f - num7 - num8) + value.Y * (num6 - num4);
364 float y = value.X * (num6 + num4) + value.Y * (1f - num5 - num8);
365 Vector2 result = default(Vector2);
366 result.X = x;
367 result.Y = y;
368 return result;
369 }
Vector2(float x, float y)
Definition Vector2.cs:35

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