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

◆ Transform() [2/2]

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

Definition at line 276 of file Vector3.cs.

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

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