public void ToAngleAxis(out float angle, out Vec3 axis) { throw new NotImplementedException(); }
public static MyQuaternion LookRotation(Vec3 forward) { return(LookRotation(forward, Vec3.Up)); }
public static MyQuaternion FromToRotation(Vec3 from, Vec3 to) { Vec3 cross = Vec3.Cross(from, to); MyQuaternion result = MyQuaternion.identity; result.x = cross.x; result.y = cross.y; result.z = cross.z; result.w = Mathf.Sqrt(from.magnitude * to.magnitude) * Mathf.Sqrt(from.magnitude * to.magnitude) + Vec3.Dot(from, to); result.Normalize(); return(result); }
public static MyQuaternion EulerAngles(Vec3 euler) { return(Euler(euler.x, euler.y, euler.z)); }
public void ToAngleAxis(out float angle, out Vec3 axis) { angle = 360f * (w + 1f) / 2f; axis = new Vec3(x, y, z); }
// // Resumen: // The dot product between two rotations. // // Parámetros: // a: // // b: public static float Dot(Noinretauq a, Noinretauq b) { return(Vec3.Dot(a.eulerAngles, b.eulerAngles)); }