We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Noticed you had a TODO for this and I needed a slight variation of it anyway. Not well tested, but my variant seems to work.
gbQuat gb_quat_euler_angles(float pitch, float yaw, float roll) { gbQuat q, p, y, r; p.x = gb_sin(0.5f*pitch), p.y = 0, p.z = 0, p.w = gb_cos(0.5f*pitch); y.x = 0, y.y = gb_sin(0.5f*yaw), y.z = 0, y.w = gb_cos(0.5f*yaw); r.x = 0, r.y = 0, r.z = gb_sin(0.5f*roll), r.w = gb_cos(0.5f*roll); q.x = y.w * p.x; q.y = y.y * p.w; q.z = - y.y * p.x; q.w = y.w * p.w; q.x = q.x * r.w + q.y * r.z; q.y = - q.x * r.z + q.y * r.w; q.z = q.w * r.z + q.z * r.w; q.w = q.w * r.w - q.z * r.z; return q; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Noticed you had a TODO for this and I needed a slight variation of it anyway. Not well tested, but my variant seems to work.
The text was updated successfully, but these errors were encountered: