-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Description
Line 546 in 3eef828
| LINMATH_H_FUNC void quat_from_mat4x4(quat q, mat4x4 const M) |
assignment is [w,x,y,z] instead of [x,y,z,w] like everywhere else:
if(r < 1e-6) {
q[0] = 1.f;
q[1] = q[2] = q[3] = 0.f;
return;
}
q[0] = r/2.f;
q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r);
q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r);
q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r);
Metadata
Metadata
Assignees
Labels
No labels