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

◆ Transform() [2/6]

static Vector4 System.Numerics.Vector4.Transform ( Vector2 value,
Quaternion rotation )
inlinestatic

Definition at line 275 of file Vector4.cs.

276 {
277 float num = rotation.X + rotation.X;
278 float num2 = rotation.Y + rotation.Y;
279 float num3 = rotation.Z + rotation.Z;
280 float num4 = rotation.W * num;
281 float num5 = rotation.W * num2;
282 float num6 = rotation.W * num3;
283 float num7 = rotation.X * num;
284 float num8 = rotation.X * num2;
285 float num9 = rotation.X * num3;
286 float num10 = rotation.Y * num2;
287 float num11 = rotation.Y * num3;
288 float num12 = rotation.Z * num3;
289 return new Vector4(value.X * (1f - num10 - num12) + value.Y * (num8 - num6), value.X * (num8 + num6) + value.Y * (1f - num7 - num12), value.X * (num9 - num5) + value.Y * (num11 + num4), 1f);
290 }
Vector4(float value)
Definition Vector4.cs:48

References System.Numerics.Vector4.Vector4(), System.value, System.Numerics.Quaternion.X, System.Numerics.Quaternion.Y, and System.Numerics.Quaternion.Z.