Nicolas Desprès
12/21/2006 12:50:00 PM
On 12/21/06, seepee <see@pee.org> wrote:
> Does anyone know of a functional Matrix math class for ruby that could
> multiply, add and substract 3x2 or larger matrices.
>
> The matrix.rb that is in Ruby API cannot multiply anything larger than 2x2
> matrices, which makes it useless for 2D or 3D graphics (for instance).
>
Are you sure?
$ irb
irb(main):001:0> Matrix[[1,2,3],[1,2,3],[1,2,3]] *
Matrix[[1,2,3],[1,2,3],[1,2,3]]
=> Matrix[[6, 12, 18], [6, 12, 18], [6, 12, 18]]
irb(main):002:0> VERSION
=> 1.8.4
$
--
Nicolas Desprès