Lua Linear Algebra Libraries?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Redshft
Prole
Posts: 12
Joined: Mon Apr 09, 2012 7:21 pm

Lua Linear Algebra Libraries?

Post 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?
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Lua Linear Algebra Libraries?

Post 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.
Redshft
Prole
Posts: 12
Joined: Mon Apr 09, 2012 7:21 pm

Re: Lua Linear Algebra Libraries?

Post 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.
User avatar
ncarlson
Prole
Posts: 35
Joined: Wed Jul 20, 2011 4:00 pm

Re: Lua Linear Algebra Libraries?

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests