Matrix/Vector Math helper functions.

I was wondering if a new class could be made to help out on some bulk math equations. For instance if I had a 3x3 matrix and I could load it with a table of vectors to calculate transforms like how opengl does it.

I am not looking to use the Open gl mind you, but it be convent if I didn’t have to loop 20 vectors in a matrix transform in lua

Even some tangent to line, or point distance to line formulas would help.

I am loving the physics/collision engine, but a 2d shooter normally doesn’t need half of the functions:P

Consequently, does anyone know if its just faster to make a table of sin/cos points or calling local sin = math.sin ?
[import]uid: 12987 topic_id: 7929 reply_id: 307929[/import]

I haven’t verified in Corona specifically, but it is almost always faster to use a precomputed lookup table for trig functions if you can get away with it. This is especially true if the number of possible angles is small - for example if you have some object which only turns in 5-degree increments. [import]uid: 32962 topic_id: 7929 reply_id: 28315[/import]