31

Decided to write an inverse matrix function and my eyes hurt already

Comments
  • 9
    Why not use a loop?
  • 22
    @harambae Because I have no clue what the hell I'm doing
  • 1
    What he said. The compiler will unroll the loop for you into that.
  • 1
    Dude, as programmers, we encounter countless problems. Sometimes a simple hardcoded soln works. But those who might get OCD'd, like me, would spend an few minutes to understand how a compiler can understand the code. ☺
  • 4
    @harambae This solution is O(1) 😁
  • 4
    I'm still clueless about matrices so I was copying a formula stahp it guys xD
  • 1
    @Memeamphetamine You have an explicit, easy to follow solution. I say that you have got it right. Loops may shorten the code but may also make it more confusing.
  • 1
    I say, comment that code out then try a loop. If it works delete the commented code. If not revert and find a better algorithm.
  • 0
    @Memeamphetamine
    But why???
    By the way, it's the opposite of clean-coding ;)
  • 0
    That's the way to go to conserve processing power... just like assembly now. =_=
  • 0
    @Duplexchipmunk just because dimensions are fixed
Add Comment