Simple 3x3 matrix inverse code (C++)

后端 未结 13 2072
花落未央
花落未央 2020-12-04 19:35

What\'s the easiest way to compute a 3x3 matrix inverse?

I\'m just looking for a short code snippet that\'ll do the trick for non-singular matrices, possibly using C

13条回答
  •  北海茫月
    2020-12-04 20:00

    A rather nice (I think) header file containing macros for most 2x2, 3x3 and 4x4 matrix operations has been available with most OpenGL toolkits. Not as standard but I've seen it at various places.

    You can check it out here. At the end of it you will find both inverse of 2x2, 3x3 and 4x4.

    vvector.h

提交回复
热议问题