Ejemplo n.º 1
0
 public static Quaternion ToQuaternion(this NEulerAngles e) => Quaternion.CreateFromYawPitchRoll(e.Yaw, e.Pitch, e.Roll);
        static void ToEulerAngles_One(NEulerAngles expected, Vector3 rotatedUnitZ, Vector3 rotatedUnitY)
        {
            var actual = NRotationHelper.ToEulerAngles(rotatedUnitZ, rotatedUnitY);

            AssertNEulerAngles(expected, actual);
        }
Ejemplo n.º 3
0
 public static Matrix4x4 ToMatrix4x4(this NEulerAngles e) => Matrix4x4.CreateFromYawPitchRoll(e.Yaw, e.Pitch, e.Roll);
 static void AssertNEulerAngles(NEulerAngles expected, NEulerAngles actual)
 {
     Assert.IsTrue(Math.Abs(expected.Yaw - actual.Yaw) < 0.001);
     Assert.IsTrue(Math.Abs(expected.Pitch - actual.Pitch) < 0.001);
     Assert.IsTrue(Math.Abs(expected.Roll - actual.Roll) < 0.001);
 }