 | | Re: Inverse matrix?
|
| (...) The inverse of <1,0,0,0,1,0,0,0,1,0,0,0> is itself. To compute the inverse of a general 3x3 matrix (essentially what you need to do) is rather complicated. You could do it in a macro using Gaussian elimination [1]. Tim [1] (URL) (19 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | |  | | Re: how does a line ends?
|
| (...) OK, as promised, here it my fgets replacement: char *myFgets(char *buf, int bufSize, FILE *file) int i; for (i = 0; i < bufSize - 1; i++) int char1 = fgetc(file); if (feof(file)) bufi = 0; if (i > 0) return buf; else return NULL; if (char1 == (...) (19 years ago, 7-Apr-07, to lugnet.cad, FTX)
| | |  | | Inverse matrix?
|
| Does anyone know how to generate an inverse matrix. By inverse I mean it will undo the rotation of the original matrix. I thought the inverse of <1,0,0,0,1,0,0,0,1,0,0,0> was <-1,0,0,0,-1,0,0,0,-1,0,0,0>. In other words, multiply every value by -1. (...) (19 years ago, 7-Apr-07, to lugnet.cad.ray, lugnet.cad)
| | |  | | Re: how does a line ends?
|
| (...) You'll note that I didn't really say that there was anything wrong with your parsing routine (other than some personaly negative feelings about fgetc and ungetc). After fixing the bugs, it will do exactly what you say it will do. It's just (...) (19 years ago, 7-Apr-07, to lugnet.cad, FTX)
| | |  | | Re: how does a line end?
|
| (...) Aaah, that's one of my most common mistakes. C is the third letter, so I think of it as 13 and not 12. (...) At last, someone agrees with me. :) There will still be a theoretical risk that problems will occur, "anything that can go wrong will (...) (19 years ago, 7-Apr-07, to lugnet.cad)
| |