public static float Pitch(Quaternion q) { float3 v = q.ydir(); return (float)Math.Atan2(v.z, Math.Sqrt(v.x * v.x + v.y * v.y)) * (180.0f / 3.14159264f); }