Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Vector3 Transform(Vector3 value, Quaternion rotation)
- {
- Vector3 vector;
- float num12 = rotation.X + rotation.X;
- float num2 = rotation.Y + rotation.Y;
- float num = rotation.Z + rotation.Z;
- float num11 = rotation.W * num12;
- float num10 = rotation.W * num2;
- float num9 = rotation.W * num;
- float num8 = rotation.X * num12;
- float num7 = rotation.X * num2;
- float num6 = rotation.X * num;
- float num5 = rotation.Y * num2;
- float num4 = rotation.Y * num;
- float num3 = rotation.Z * num;
- float num15 = ((value.X * ((1f - num5) - num3)) + (value.Y * (num7 - num9))) + (value.Z * (num6 + num10));
- float num14 = ((value.X * (num7 + num9)) + (value.Y * ((1f - num8) - num3))) + (value.Z * (num4 - num11));
- float num13 = ((value.X * (num6 - num10)) + (value.Y * (num4 + num11))) + (value.Z * ((1f - num8) - num5));
- vector.X = num15;
- vector.Y = num14;
- vector.Z = num13;
- return vector;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement