public static float Pitch(Quatf q) { //return MathFunctions.Degrees((float)Math.Atan2(2.0f * (q.y * q.z + q.w * q.x), return(MathF.ToDegrees(MathF.Atan2(2.0f * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z))); }
public static float Yaw(Quatf q) { return(MathF.ToDegrees(MathF.Asin(-2.0f * (q.x * q.z - q.w * q.y)))); //return MathFunctions.Degrees((float)Math.Asin(-2.0f * (q.x * q.z - q.w * q.y))); }
public static float GetAngle(Quatf q) { //return (float)MathFunctions.Degrees((float)Math.Acos(q.w) * 2.0f); return(MathF.ToDegrees(MathF.Acos(q.w) * 2.0f)); }