Vector.lhs
(See this post in color.)
On my last graphics assignment, I spent far more effort on some non-requirements than on requirements. Among those was a Vector class, for dealing with vectors and matrices of any size. Much of it went unused, but rather than let it just go to waste, I figure I’ll share it instead. It’s hypothetically possible that it could be helpful to somebody, so here it is, cleaned up a bit and with more documentation.
(This post is in Literate Haskell format. This means that, in addition to looking pretty, you can copy’n’paste the whole thing right into Vector.lhs and any Haskell compiler will be able to read it.)
( Vector.lhs )
On my last graphics assignment, I spent far more effort on some non-requirements than on requirements. Among those was a Vector class, for dealing with vectors and matrices of any size. Much of it went unused, but rather than let it just go to waste, I figure I’ll share it instead. It’s hypothetically possible that it could be helpful to somebody, so here it is, cleaned up a bit and with more documentation.
(This post is in Literate Haskell format. This means that, in addition to looking pretty, you can copy’n’paste the whole thing right into Vector.lhs and any Haskell compiler will be able to read it.)
( Vector.lhs )
