Table of Contents
Identity
Matrix.Identity(n) returns an identity matrix of size $n\times n$.
If the option “Userdata” is set to true (default is false) the output is returned as a pointer rather than a table of tables (compare Matrix.ToUserdata()).
Example
Input
- Example.Quanty
print(Matrix.Identity(3))
Result
{ { 1 , 0 , 0 } , { 0 , 1 , 0 } , { 0 , 0 , 1 } }