Skip to content

Commit

Permalink
Bugfix: datenwolf#29
Browse files Browse the repository at this point in the history
  • Loading branch information
iurii-provizio committed May 31, 2022
1 parent 543cf61 commit e1d49ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions linmath.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,10 @@ LINMATH_H_FUNC void quat_from_mat4x4(quat q, mat4x4 M)
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);
q[0] = (M[p[0]][p[1]] - M[p[1]][p[0]]) / (2.f * r);
q[1] = (M[p[2]][p[0]] - M[p[0]][p[2]]) / (2.f * r);
q[2] = (M[p[2]][p[1]] - M[p[1]][p[2]]) / (2.f * r);
q[3] = r / 2.f;
}

LINMATH_H_FUNC void mat4x4_arcball(mat4x4 R, mat4x4 M, vec2 _a, vec2 _b, float s)
Expand Down

0 comments on commit e1d49ef

Please sign in to comment.