mlepage / linear-algebra Goto Github PK
View Code? Open in Web Editor NEWSimple linear algebra module for Lua. Suitable for common 3D vector operations. Useful with LuaGL (OpenGL). MIT license.
License: MIT License
Simple linear algebra module for Lua. Suitable for common 3D vector operations. Useful with LuaGL (OpenGL). MIT license.
License: MIT License
Linear algrebra module by Marc Lepage OVERVIEW The linear algebra module can perform common operations on three dimensional vectors. It's useful when using LuaGL (OpenGL). USAGE -- import module require "la" -- create a few vectors (any table with numbers at indexes [1] [2] [3]) u, v = {1,0,0}, {0,1,0} -- compute u + v r = la.add(u, v) -- results are new vectors (convenience) la.add(u, v, r) -- unless a result vector is specified (better performance) la.add(u, v, u) -- which can safely be one of the operands (u += v) -- compute u - v (so u is again {1,0,0}) la.sub(u, v, u) -- dot product is projection (result is 0 since u and v are orthogonal) la.dot(u, v) -- cross product is right handed (result is {0,0,1}) la.cross(u, v) -- negate and normalize (result is approx {-0.707,-0.707,0}) la.neg(la.norm({1,1,0})) -- scalar multiplication (2*u) and division (v/3) la.mul(u, 2) la.div(v, 3) RESOURCES http://en.wikipedia.org/wiki/Linear_algebra http://en.wikipedia.org/wiki/Euclidean_vector http://en.wikipedia.org/wiki/Dot_product http://en.wikipedia.org/wiki/Cross_product
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.