Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documentation:language_reference:objects:matrix:functions:touserdata [2018/09/25 15:34] – Added Code Example Simon Heinze | documentation:language_reference:objects:matrix:functions:touserdata [2019/04/12 10:22] (current) – Corrected my grammar Simon Heinze | ||
---|---|---|---|
Line 5: | Line 5: | ||
Matrices are, per default, tables of tables in Lua. When algebraic operations are performed on them, they are repeatedly copied and moved, which can lead to severe performance issues if the matrices are large objects. | Matrices are, per default, tables of tables in Lua. When algebraic operations are performed on them, they are repeatedly copied and moved, which can lead to severe performance issues if the matrices are large objects. | ||
- | A call of Matrix.ToUserdata($M$) takes a matrix and transforms it, from Lua's point of view, from a table of tables to a mere pointer, which it returns. This means that the object still has all functionalities Quanty defines on it with increased performance. The downside is that any functionalities Lua defines on tables | + | A call of Matrix.ToUserdata($M$) takes a matrix and transforms it, from Lua's point of view, from a table of tables to a mere pointer, which it returns. This means that the object still has all functionalities Quanty defines on it, but with increased performance. The downside is that any functionalities Lua defines on tables |
The inverse operation of Matrix.ToUserdata() is // | The inverse operation of Matrix.ToUserdata() is // |