Page 1 of 1

Lua Linear Algebra Libraries?

Posted: Tue Apr 10, 2012 1:18 am
by Redshft
Hey Everyone,
I've been looking around for a math library that defines vectors and vector operations, addition, subtraction, dot product, magnitude, normalization etc. I've looked a bit at the Love engine wiki and it didn't seem like there was anything of that sort there. Plus the standard Lua library doesn't include vectors and their operations.

What library do you guys use? Which one is recommended?

Re: Lua Linear Algebra Libraries?

Posted: Tue Apr 10, 2012 1:42 am
by slime
Personally I use hump.vector (code). Someone has been working on a library which mirrors the GLSL vector syntax and functions, so I might use that once it's finished and stable.

Re: Lua Linear Algebra Libraries?

Posted: Tue Apr 10, 2012 3:21 am
by Redshft
slime wrote:Personally I use hump.vector (code). Someone has been working on a library which mirrors the GLSL vector syntax and functions, so I might use that once it's finished and stable.
Thanks. This is exactly what i'm looking for.

Re: Lua Linear Algebra Libraries?

Posted: Tue Apr 10, 2012 3:56 pm
by ncarlson
I wrote the the other day. I'll put it in a repo soon. It supports vectors with 1~4 components.

http://paste2.org/p/1968108