https://github.com/monolifed/lua-module ... main/vmath (MIT Licensed)
Library is a port of my C library: https://github.com/monolifed/vmath (Unlicense)
IQM animation demo is modified to use this library (replacing cpml)
Math Library (with iqm animation demo)
- Gunroar:Cannon()
- Party member
- Posts: 1143
- Joined: Thu Dec 10, 2020 1:57 am
Re: Math Library (with iqm animation demo)
Nice. It seems to have alot of stuff, that's good!
Re: Math Library (with iqm animation demo)
It's nice that this library uses numeric components instead of letters, and flat matrices instead of two-dimensional. Also nice that it returns values via modifying an argument. I've made work on a library that works this way, but the unit tests were too boring to write.
Typo:
Pay attention to r[3].
Typo:
Code: Select all
function quat.from_rot(r, v, a)
a = a / 2
local s = sin(a) / sqrt(v[1]^2 + v[2]^2 + v[3]^2)
r[1] = s * v[1]; r[2] = s * v[2]; r[3] = s * v[2]
Re: Math Library (with iqm animation demo)
Thanks, there must be more typos and mistakes
It should have been function quat.from_rot(r, a, x, y, z) like (mat4.rv etc) to begin with
It should have been function quat.from_rot(r, a, x, y, z) like (mat4.rv etc) to begin with
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], zazabar and 3 guests